[pypy-commit] pypy default: OperationError is not imported here

arigo pypy.commits at gmail.com
Sat May 28 11:29:00 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r84781:3caf5c62dcdf
Date: 2016-05-28 16:35 +0100
http://bitbucket.org/pypy/pypy/changeset/3caf5c62dcdf/

Log:	OperationError is not imported here

diff --git a/pypy/module/cpyext/typeobject.py b/pypy/module/cpyext/typeobject.py
--- a/pypy/module/cpyext/typeobject.py
+++ b/pypy/module/cpyext/typeobject.py
@@ -523,8 +523,8 @@
 def str_getreadbuffer(space, w_str, segment, ref):
     from pypy.module.cpyext.bytesobject import PyString_AsString
     if segment != 0:
-        raise OperationError(space.w_SystemError, space.wrap
-                             ("accessing non-existent string segment"))
+        raise oefmt(space.w_SystemError,
+                    "accessing non-existent string segment")
     pyref = make_ref(space, w_str)
     ref[0] = PyString_AsString(space, pyref)
     # Stolen reference: the object has better exist somewhere else


More information about the pypy-commit mailing list