mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 00:22:04 +02:00
no need for U flag because we won't support py2 on windows
This commit is contained in:
@@ -458,10 +458,6 @@ def sha256sum(filename):
|
|||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
sha256 = hashlib.sha256()
|
sha256 = hashlib.sha256()
|
||||||
if six.PY2:
|
|
||||||
with open(filename, 'rU') as file_d:
|
|
||||||
sha256.update(file_d.read().encode('UTF-8'))
|
|
||||||
else:
|
|
||||||
with open(filename, 'r', newline=None) as file_d:
|
with open(filename, 'r', newline=None) 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()
|
||||||
|
|||||||
Reference in New Issue
Block a user