summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/create.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging/create.py')
-rw-r--r--Lib/packaging/create.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/packaging/create.py b/Lib/packaging/create.py
index 837d0b6..0676cf1 100644
--- a/Lib/packaging/create.py
+++ b/Lib/packaging/create.py
@@ -400,10 +400,10 @@ class MainProgram:
self.data['description']).lower().encode())
ref = ref.digest()
for readme in glob.glob('README*'):
- with open(readme) as fp:
+ with open(readme, encoding='utf-8') as fp:
contents = fp.read()
- val = md5(re.sub('\s', '',
- contents.lower()).encode()).digest()
+ contents = re.sub('\s', '', contents.lower()).encode()
+ val = md5(contents).digest()
if val == ref:
del data['description']
data['description-file'] = readme