1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Catch error when md5sum file is corrupted

Fix #622
This commit is contained in:
Julien Duponchelle 2016-07-28 12:34:41 +02:00
parent b1b2bbd581
commit 7d90a73ed2
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -36,7 +36,8 @@ def md5sum(path):
try: try:
with open(path + '.md5sum') as f: with open(path + '.md5sum') as f:
return f.read() return f.read()
except OSError: # Unicode error is when user rename an image to .md5sum ....
except (OSError, UnicodeDecodeError):
pass pass
try: try: