diff Python/freeze_importlib.py @ 76357:e97ead910cc1

Avoid compiler warning due to stray \x00
author Antoine Pitrou <solipsis@pitrou.net>
date Mon, 16 Apr 2012 18:30:54 +0200
parents c3b823e8dcd3
children 6e5c517da087
line wrap: on
line diff
--- a/Python/freeze_importlib.py	Mon Apr 16 18:29:28 2012 +0200
+++ b/Python/freeze_importlib.py	Mon Apr 16 18:30:54 2012 +0200
@@ -22,9 +22,9 @@
             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__':