mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Return md5sum and filesize in the list of images
Ref https://github.com/GNS3/gns3-gui/issues/1590
This commit is contained in:
10 files changed
+49
-18
No files matched your search
@@ -92,7 +92,9 @@ def md5sum(path):
|
||||
|
||||
try:
|
||||
with open(path + '.md5sum') as f:
|
||||
return f.read()
|
||||
md5 = f.read()
|
||||
if len(md5) == 32:
|
||||
return md5
|
||||
# Unicode error is when user rename an image to .md5sum ....
|
||||
except (OSError, UnicodeDecodeError):
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user