mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-02 11:06:44 +00:00
Remove unwanted trailing characters and other white spaces when reading .md5sum files.
This commit is contained in:
parent
051eedb406
commit
f8bf749577
@ -156,7 +156,7 @@ def md5sum(path):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with open(path + '.md5sum') as f:
|
with open(path + '.md5sum') as f:
|
||||||
md5 = f.read()
|
md5 = f.read().strip()
|
||||||
if len(md5) == 32:
|
if len(md5) == 32:
|
||||||
return md5
|
return md5
|
||||||
# Unicode error is when user rename an image to .md5sum ....
|
# Unicode error is when user rename an image to .md5sum ....
|
||||||
|
Loading…
Reference in New Issue
Block a user