mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
Overwrite user resources when the originals have changed.
Excepting configs and disks which can be customized.
This commit is contained in:
4 files changed
+29
-10
No files matched your search
@@ -23,6 +23,7 @@ import textwrap
|
||||
import posixpath
|
||||
import socket
|
||||
import errno
|
||||
import hashlib
|
||||
|
||||
|
||||
def force_unix_path(path):
|
||||
@@ -120,3 +121,14 @@ def is_ipv6_enabled() -> bool:
|
||||
if e.errno == errno.EADDRINUSE:
|
||||
return True
|
||||
raise
|
||||
|
||||
def md5sum(filename):
|
||||
"""
|
||||
Calculate the MD5 checksum of a file.
|
||||
"""
|
||||
|
||||
hash_md5 = hashlib.md5()
|
||||
with open(filename, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(4096), b""):
|
||||
hash_md5.update(chunk)
|
||||
return hash_md5.hexdigest()
|
||||
Reference in new issue
Block a user