From 79b2ea19fbd5b360eabf6abe56530d45e1f2bcd8 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Mon, 5 Nov 2018 17:19:57 -0800 Subject: [PATCH] no need for U flag because we won't support py2 on windows --- certbot/crypto_util.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/certbot/crypto_util.py b/certbot/crypto_util.py index 7b558b060..820bcd805 100644 --- a/certbot/crypto_util.py +++ b/certbot/crypto_util.py @@ -458,12 +458,8 @@ def sha256sum(filename): :rtype: str """ 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: - sha256.update(file_d.read().encode('UTF-8')) + with open(filename, 'r', newline=None) as file_d: + sha256.update(file_d.read().encode('UTF-8')) return sha256.hexdigest() def cert_and_chain_from_fullchain(fullchain_pem):