Author: Matti Picus <matti.pi...@gmail.com>
Branch: py3.6
Changeset: r97529:be7243dd1d25
Date: 2019-09-19 08:29 +0300
http://bitbucket.org/pypy/pypy/changeset/be7243dd1d25/

Log:    fix translation

diff --git a/pypy/interpreter/pyparser/parsestring.py 
b/pypy/interpreter/pyparser/parsestring.py
--- a/pypy/interpreter/pyparser/parsestring.py
+++ b/pypy/interpreter/pyparser/parsestring.py
@@ -249,12 +249,12 @@
     buf = builder.build()
 
     if first_escape_error_char != '':
+        msg = "invalid escape sequence '%s'"
         try:
-            msg = "invalid escape sequence '\\%s'" % first_escape_error_char
-            space.warn(space.newtext(msg), space.w_DeprecationWarning)
+            space.warn(space.newtext(msg % first_escape_error_char), 
space.w_DeprecationWarning)
         except OperationError as e:
             if e.match(space, space.w_DeprecationWarning):
-                raise oefmt(space.w_SyntaxError, msg)
+                raise oefmt(space.w_SyntaxError, msg, first_escape_error_char)
             else:
                 raise
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to