[PATCH 6/7] Remember to pass the arguments to the exception handler.

Brian C. Lane bcl at redhat.com
Fri Jun 12 19:16:44 UTC 2015


From: Chris Lumens <clumens at redhat.com>

---
 src/_pedmodule.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/_pedmodule.c b/src/_pedmodule.c
index a048d91..cfe2dd8 100644
--- a/src/_pedmodule.c
+++ b/src/_pedmodule.c
@@ -407,7 +407,7 @@ static PedExceptionOption partedExnHandler(PedException *e) {
                     PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
                     PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
 
-                    retval = PyObject_CallObject(exn_handler, NULL);
+                    retval = PyObject_CallObject(exn_handler, args);
                     Py_DECREF(args);
                     if (retval != NULL && (PyLong_AsLong(retval) == PED_EXCEPTION_UNHANDLED || (PyLong_AsLong(retval) & e->options) > 0))
                         return PyLong_AsLong(retval);
@@ -445,7 +445,7 @@ static PedExceptionOption partedExnHandler(PedException *e) {
                 PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
                 PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
 
-                retval = PyObject_CallObject(exn_handler, NULL);
+                retval = PyObject_CallObject(exn_handler, args);
                 Py_DECREF(args);
                 if (retval != NULL && (PyLong_AsLong(retval) == PED_EXCEPTION_UNHANDLED || (PyLong_AsLong(retval) & e->options) > 0))
                     return PyLong_AsLong(retval);
-- 
2.4.0



More information about the anaconda-patches mailing list