From d92f77606aa6cfcb1e3e792a880b290d77f1c8fd Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 23 Jan 2020 21:41:46 -0800 Subject: [PATCH] [lldb/Util] Fix Python 3 incompatibility in lldb-repro This fixes: TypeError: Unicode-objects must be encoded before hashing --- lldb/utils/lldb-repro/lldb-repro.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/utils/lldb-repro/lldb-repro.py b/lldb/utils/lldb-repro/lldb-repro.py index c1d62994f2f3..313d3855a025 100755 --- a/lldb/utils/lldb-repro/lldb-repro.py +++ b/lldb/utils/lldb-repro/lldb-repro.py @@ -33,8 +33,8 @@ def main(): # Compute an MD5 hash based on the input arguments and the current working # directory. h = hashlib.md5() - h.update(' '.join(sys.argv[2:])) - h.update(os.getcwd()) + h.update(' '.join(sys.argv[2:]).encode('utf-8')) + h.update(os.getcwd().encode('utf-8')) input_hash = h.hexdigest() # Use the hash to "uniquely" identify a reproducer path.