Message164426
Here is a quick patch (needs a test):
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -834,6 +834,7 @@ oserror_init(PyOSErrorObject *self, PyOb
#endif
/* Steals the reference to args */
+ Py_CLEAR(self->args);
self->args = args;
args = NULL;
@@ -916,6 +917,11 @@ OSError_new(PyTypeObject *type, PyObject
))
goto error;
}
+ else {
+ self->args = PyTuple_New(0);
+ if (self->args == NULL)
+ goto error;
+ }
return (PyObject *) self; |
|
Date |
User |
Action |
Args |
2012-06-30 20:46:12 | pitrou | set | recipients:
+ pitrou, sbt |
2012-06-30 20:46:12 | pitrou | set | messageid: <1341089172.58.0.278128754635.issue15229@psf.upfronthosting.co.za> |
2012-06-30 20:46:12 | pitrou | link | issue15229 messages |
2012-06-30 20:46:11 | pitrou | create | |
|