[Lldb-commits] [lldb] d92f776 - [lldb/Util] Fix Python 3 incompatibility in lldb-repro
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 23 21:42:30 PST 2020
Author: Jonas Devlieghere
Date: 2020-01-23T21:41:49-08:00
New Revision: d92f77606aa6cfcb1e3e792a880b290d77f1c8fd
URL: https://github.com/llvm/llvm-project/commit/d92f77606aa6cfcb1e3e792a880b290d77f1c8fd
DIFF: https://github.com/llvm/llvm-project/commit/d92f77606aa6cfcb1e3e792a880b290d77f1c8fd.diff
LOG: [lldb/Util] Fix Python 3 incompatibility in lldb-repro
This fixes: TypeError: Unicode-objects must be encoded before hashing
Added:
Modified:
lldb/utils/lldb-repro/lldb-repro.py
Removed:
################################################################################
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.
More information about the lldb-commits
mailing list