diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-06-18 09:25:01 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-06-18 09:25:01 +0200 |
commit | 953c9666ac807de2b9f6222b8d399a2c5e45e522 (patch) | |
tree | a104aed7117ef8c964551ee74f4fcd8c2cbe87dc /giscanner/dumper.py | |
parent | 9654e5a2bb38c0fbd3ba343ab93643f76862c187 (diff) | |
download | gobject-introspection-953c9666ac807de2b9f6222b8d399a2c5e45e522.tar.gz |
dumper: fix for Python 3
The MSYS2 only code wasn't ported to Python 3 and failed with a TypeError
Diffstat (limited to 'giscanner/dumper.py')
-rw-r--r-- | giscanner/dumper.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py index 8d255bfc..06737188 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -287,6 +287,8 @@ class DumpCompiler(object): with os.fdopen(tf, 'wb') as f: shellcontents = ' '.join([x.replace('\\', '/') for x in args]) fcontents = '#!/bin/sh\nunset PWD\n{}\n'.format(shellcontents) + if not isinstance(fcontents, bytes): + fcontents = fcontents.encode('utf-8') f.write(fcontents) shell = utils.which(shell) args = [shell, tf_name.replace('\\', '/')] |