summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-09 10:51:30 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-09 10:51:30 (GMT)
commit90378b48077a1bb9a4805719b658312d7a35cbdd (patch)
treed2407d5b1ae83c78226a5a2ae8f496b4c3edcbf7 /Tools
parentdc945e4943a17fc6f15e35ccef506ad75e878545 (diff)
parent956c6c2dabe893e5c389d3d84a614aae469851e3 (diff)
downloadcpython-90378b48077a1bb9a4805719b658312d7a35cbdd.zip
cpython-90378b48077a1bb9a4805719b658312d7a35cbdd.tar.gz
cpython-90378b48077a1bb9a4805719b658312d7a35cbdd.tar.bz2
#13301: merge with 3.3.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/i18n/msgfmt.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/i18n/msgfmt.py b/Tools/i18n/msgfmt.py
index a554442..7b3a81f 100755
--- a/Tools/i18n/msgfmt.py
+++ b/Tools/i18n/msgfmt.py
@@ -24,8 +24,9 @@ Options:
Display version information and exit.
"""
-import sys
import os
+import sys
+import ast
import getopt
import struct
import array
@@ -180,8 +181,7 @@ def make(filename, outfile):
l = l.strip()
if not l:
continue
- # XXX: Does this always follow Python escape semantics?
- l = eval(l)
+ l = ast.literal_eval(l)
if section == ID:
msgid += l.encode(encoding)
elif section == STR: