diff options
Diffstat (limited to 'Tools/freeze/makefreeze.py')
-rw-r--r-- | Tools/freeze/makefreeze.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Tools/freeze/makefreeze.py b/Tools/freeze/makefreeze.py index e359db9..4cd1e96 100644 --- a/Tools/freeze/makefreeze.py +++ b/Tools/freeze/makefreeze.py @@ -33,8 +33,7 @@ def makefreeze(base, dict, debug=0, entry_point=None, fail_import=()): if entry_point is None: entry_point = default_entry_point done = [] files = [] - mods = dict.keys() - mods.sort() + mods = sorted(dict.keys()) for mod in mods: m = dict[mod] mangled = "__".join(mod.split(".")) @@ -81,8 +80,8 @@ def writecode(outfp, mod, str): outfp.write('unsigned char M_%s[] = {' % mod) for i in range(0, len(str), 16): outfp.write('\n\t') - for c in str[i:i+16]: - outfp.write('%d,' % ord(c)) + for c in bytes(str[i:i+16]): + outfp.write('%d,' % c) outfp.write('\n};\n') ## def writecode(outfp, mod, str): |