summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-07-16 13:41:50 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-07-29 10:20:41 +0200
commitf58c82e7234c7c1f09afc2971543f858a0e808ee (patch)
tree9a9868b26c3ca2e52667baff74a46b2be66fa2c7 /lib
parent470443ae69e51ac3cebf1c081544c6c19f960f11 (diff)
bugs.py: encode the string before using the digest
Needed for py3 compatibility.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/bugs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/bugs.py b/lib/python/bugs.py
index f0ef8c9ab7..63cae22747 100644
--- a/lib/python/bugs.py
+++ b/lib/python/bugs.py
@@ -407,7 +407,7 @@ def temp_bug_name(bug_number, description):
"""Build a unique temporary name from the bug number and a
truncated hash of the description."""
digest = hashlib.md5()
- digest.update(description)
+ digest.update(description.encode('utf-8'))
hexdigest = digest.hexdigest()[0:6].upper()
return 'TEMP-%07d-%s' % (bug_number, hexdigest)

© 2014-2024 Faster IT GmbH | imprint | privacy policy