diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2014-07-30 01:18:56 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2014-07-30 01:18:56 +0400 |
commit | c0d7aad0691f4f7aa826bfaffc72cfe968d74dd4 (patch) | |
tree | 191fda7a95ffb0ee9dcac571046de054ce5a8437 /scripts | |
parent | 340c7b69fb80038c644d1d1b8aba5f1b0231d474 (diff) |
scripts/gen-mumble_app-qt-def.py: add Python 3 compatibility.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-mumble_app-qt-def.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/gen-mumble_app-qt-def.py b/scripts/gen-mumble_app-qt-def.py index f18324095..91a68f4cb 100755 --- a/scripts/gen-mumble_app-qt-def.py +++ b/scripts/gen-mumble_app-qt-def.py @@ -42,6 +42,8 @@ # future, since the current iteration is likely to produce unneeded # exports. +from __future__ import (unicode_literals, print_function, division) + import subprocess import sys import re @@ -110,6 +112,11 @@ def processExports(f, libs, symbols): if p.returncode != 0: raise Exception('dumpbin.exe failed: %s', stderr) + if stdout is not None: + stdout = stdout.decode('utf-8') + if stderr is not None: + stderr = stderr.decode('utf-8') + symbol_re = re.compile('^.*\ (.*(%s)+?.*)$' % '|'.join(symbols)) f.write('EXPORTS\n\n') @@ -124,7 +131,7 @@ def processExports(f, libs, symbols): def main(): if len(sys.argv) < 4: - print 'Usage: gen-mumble_app-qt-def.py <release|debug> <qt-lib-path> <outfn>' + print('Usage: gen-mumble_app-qt-def.py <release|debug> <qt-lib-path> <outfn>') sys.exit(1) kind = sys.argv[1] |