summaryrefslogtreecommitdiffstats
path: root/Python/freeze_importlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-04-16 16:30:54 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-04-16 16:30:54 (GMT)
commita938c74751d3ffb23cb68044939a5c06d2d4f280 (patch)
treed2dedb59f1b087e9b48c379db339f3fb206fddc4 /Python/freeze_importlib.py
parenta49323537b6edb6f2b3142d48de14ca83cf46b8c (diff)
downloadcpython-a938c74751d3ffb23cb68044939a5c06d2d4f280.zip
cpython-a938c74751d3ffb23cb68044939a5c06d2d4f280.tar.gz
cpython-a938c74751d3ffb23cb68044939a5c06d2d4f280.tar.bz2
Avoid compiler warning due to stray \x00
Diffstat (limited to 'Python/freeze_importlib.py')
-rw-r--r--Python/freeze_importlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/freeze_importlib.py b/Python/freeze_importlib.py
index 9cce0b1..c012722 100644
--- a/Python/freeze_importlib.py
+++ b/Python/freeze_importlib.py
@@ -22,9 +22,9 @@ def main(input_path, output_path):
line.append('%d,' % c)
lines.append(''.join(line))
lines.append('};\n')
- with open(output_path, 'w') as output_file:
+ with open(output_path, 'w', encoding='utf-8') as output_file:
output_file.write('\n'.join(lines))
- output_file.write('\u0000')
+ output_file.write('/* Mercurial binary marker: \x00 */')
if __name__ == '__main__':