no newline in py27

This commit is contained in:
Erica Portnoy
2018-11-05 17:47:38 -08:00
parent 39a008eb83
commit 92989956f9
+1 -1
View File
@@ -458,7 +458,7 @@ def sha256sum(filename):
:rtype: str :rtype: str
""" """
sha256 = hashlib.sha256() sha256 = hashlib.sha256()
with open(filename, 'r', newline=None) as file_d: with open(filename, 'r') as file_d:
sha256.update(file_d.read().encode('UTF-8')) sha256.update(file_d.read().encode('UTF-8'))
return sha256.hexdigest() return sha256.hexdigest()