[pypy-commit] pypy py3.3: Avoid crash in OSError.__str__()
amauryfa
noreply at buildbot.pypy.org
Tue Dec 30 17:22:42 CET 2014
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.3
Changeset: r75165:d04014eeb0f2
Date: 2014-12-30 16:33 +0100
http://bitbucket.org/pypy/pypy/changeset/d04014eeb0f2/
Log: Avoid crash in OSError.__str__()
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
@@ -543,8 +543,10 @@
def _init_error(self, space, args_w, w_errno, w_strerror, w_filename):
W_BaseException.descr_init(self, space, args_w)
- self.w_errno = w_errno
- self.w_strerror = w_strerror
+ if w_errno:
+ self.w_errno = w_errno
+ if w_strerror:
+ self.w_strerror = w_strerror
if not space.is_none(w_filename):
if space.isinstance_w(
More information about the pypy-commit
mailing list