There was an error while loading. Please reload this page.
2 parents 2a61452 + 55c6cc4 commit a340948Copy full SHA for a340948
1 file changed
Tools/i18n/makelocalealias.py
@@ -13,8 +13,8 @@
13
14
def parse(filename):
15
16
- f = open(filename)
17
- lines = f.read().splitlines()
+ with open(filename, encoding='latin1') as f:
+ lines = list(f)
18
data = {}
19
for line in lines:
20
line = line.strip()
@@ -47,15 +47,15 @@ def parse(filename):
47
def pprint(data):
48
items = sorted(data.items())
49
for k, v in items:
50
- print(' %-40s%r,' % ('%r:' % k, v))
+ print(' %-40s%a,' % ('%a:' % k, v))
51
52
def print_differences(data, olddata):
53
items = sorted(olddata.items())
54
55
if k not in data:
56
- print('# removed %r' % k)
+ print('# removed %a' % k)
57
elif olddata[k] != data[k]:
58
- print('# updated %r -> %r to %r' % \
+ print('# updated %a -> %a to %a' % \
59
(k, olddata[k], data[k]))
60
# Additions are not mentioned
61
0 commit comments