aboutsummaryrefslogtreecommitdiff
path: root/lldb/utils
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-01-23 21:41:46 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2020-01-23 21:41:49 -0800
commitd92f77606aa6cfcb1e3e792a880b290d77f1c8fd (patch)
tree22887a005b6353e40272e8198656d71bacfdc82f /lldb/utils
parenta2137d6e097c9122c3bb08c4ef70636761aa10b9 (diff)
downloadllvm-d92f77606aa6cfcb1e3e792a880b290d77f1c8fd.zip
llvm-d92f77606aa6cfcb1e3e792a880b290d77f1c8fd.tar.gz
llvm-d92f77606aa6cfcb1e3e792a880b290d77f1c8fd.tar.bz2
[lldb/Util] Fix Python 3 incompatibility in lldb-repro
This fixes: TypeError: Unicode-objects must be encoded before hashing
Diffstat (limited to 'lldb/utils')
-rwxr-xr-xlldb/utils/lldb-repro/lldb-repro.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/utils/lldb-repro/lldb-repro.py b/lldb/utils/lldb-repro/lldb-repro.py
index c1d6299..313d385 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.