From df9081c72edc9e531ebd7a3b992ea286545d0bce Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Thu, 16 Jul 2020 13:41:50 +0200 Subject: bugs.py: encode the string before using the digest Needed for py3 compatibility. --- lib/python/bugs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3