String needs to be encoded when passed to hashlib

This commit is contained in:
Raoul Snyman 2019-04-10 13:46:17 -07:00
parent 5bb973c118
commit bffdbcff58
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ class WindowsBuilder(Builder):
parent_dir['__dir__'].append(element)
for fname in files:
source = os.path.join(path, fname) if path else fname
source_id = md5(source).hexdigest()
source_id = md5(source.encode('utf8')).hexdigest()
file_id = 'file_{source_id}'.format(source_id=source_id)
component_id = 'cmp_{source_id}'.format(source_id=source_id)
file_ = E.File(Id=file_id, KeyPath="yes", Source=source)