From 4e8ea4e853efeca6782e905a75f83a5e704a5fb0 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 14 Nov 2015 22:14:32 +0000 Subject: [PATCH] Python SystemError fix with -builtin Fix error when append on a SWIG Object with -builtin: x.append(10) SystemError: error return without exception set Having append and next methods on a SWIG object by default doesn't seem right to me though. --- Lib/python/pyrun.swg | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 5eedca483..d43b75202 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -569,6 +569,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) next = tmp; #endif if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next;