From bffdbcff5808be36eb6bac970ab6e9f9dae95925 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 10 Apr 2019 13:46:17 -0700 Subject: [PATCH] String needs to be encoded when passed to hashlib --- builders/windows-builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builders/windows-builder.py b/builders/windows-builder.py index d549933..d591ec4 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -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)