Return md5sum and filesize in the list of images

Ref https://github.com/GNS3/gns3-gui/issues/1590
This commit is contained in:
Julien Duponchelle committed 2016-10-20 17:24:05 +02:00
1 parent 69fcf801c3
commit 106915f419
10 files changed
+49 -18

No files matched your search

+3 -1
View File
@@ -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