From f8bf74957747add55bf87d52e83885fa5b89a158 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 5 Jun 2018 00:01:20 +0700 Subject: [PATCH] Remove unwanted trailing characters and other white spaces when reading .md5sum files. --- gns3server/utils/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/utils/images.py b/gns3server/utils/images.py index 794d19e7..8cd76143 100644 --- a/gns3server/utils/images.py +++ b/gns3server/utils/images.py @@ -156,7 +156,7 @@ def md5sum(path): try: with open(path + '.md5sum') as f: - md5 = f.read() + md5 = f.read().strip() if len(md5) == 32: return md5 # Unicode error is when user rename an image to .md5sum ....