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
commitdf9081c72edc9e531ebd7a3b992ea286545d0bce (patch)
tree3e83c992981c0f9897524cc31e66622f5bd44ded /lib
parent37e775cc5d145a4e5c573278c694a098b6c10066 (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