[pypy-commit] pypy unicode-utf8: another untested part of exceptions module

fijal pypy.commits at gmail.com
Sun Dec 3 16:25:24 EST 2017


Author: fijal
Branch: unicode-utf8
Changeset: r93267:9280e1159635
Date: 2017-12-03 16:40 +0100
http://bitbucket.org/pypy/pypy/changeset/9280e1159635/

Log:	another untested part of exceptions module

diff --git a/pypy/module/exceptions/interp_exceptions.py b/pypy/module/exceptions/interp_exceptions.py
--- a/pypy/module/exceptions/interp_exceptions.py
+++ b/pypy/module/exceptions/interp_exceptions.py
@@ -78,6 +78,7 @@
 from pypy.interpreter.gateway import interp2app
 from pypy.interpreter.error import OperationError, oefmt
 from rpython.rlib import rwin32
+from rpython.rlib.rutf8 import FLAG_ASCII
 
 
 def readwrite_attrproperty_w(name, cls):
@@ -126,7 +127,7 @@
             return space.call_function(space.w_unicode, w_as_str)
         lgt = len(self.args_w)
         if lgt == 0:
-            return space.newunicode(u"")
+            return space.newutf8("", 0, FLAG_ASCII)
         if lgt == 1:
             return space.call_function(space.w_unicode, self.args_w[0])
         else:


More information about the pypy-commit mailing list