[pypy-commit] pypy py3.6: FormatErrorW returns a tuple text, unicode_len

mattip pypy.commits at gmail.com
Sun Mar 3 03:24:31 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r96201:fe52877bd963
Date: 2019-03-03 10:26 +0200
http://bitbucket.org/pypy/pypy/changeset/fe52877bd963/

Log:	FormatErrorW returns a tuple text, unicode_len

diff --git a/pypy/module/_winreg/interp_winreg.py b/pypy/module/_winreg/interp_winreg.py
--- a/pypy/module/_winreg/interp_winreg.py
+++ b/pypy/module/_winreg/interp_winreg.py
@@ -10,9 +10,9 @@
 def raiseWindowsError(space, errcode, context):
     message = rwin32.FormatErrorW(errcode)
     w_errcode = space.newint(errcode)
-    raise OperationError(space.w_WindowsError,
-                         space.newtuple([w_errcode, space.newtext(message),
-                                        space.w_None, w_errcode]))
+    w_t = space.newtuple([w_errcode, space.newtext(*message),
+                                        space.w_None, w_errcode])
+    raise OperationError(space.w_WindowsError, w_t)
 
 class W_HKEY(W_Root):
     def __init__(self, space, hkey):


More information about the pypy-commit mailing list