[lldb/Util] Fix Python 3 incompatibility in lldb-repro

This fixes: TypeError: Unicode-objects must be encoded before hashing
This commit is contained in:
Jonas Devlieghere 2020-01-23 21:41:46 -08:00
parent a2137d6e09
commit d92f77606a
1 changed files with 2 additions and 2 deletions

View File

@ -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.