Blob Blame History Raw
From 603534d12ed52405e9f464f9608fea725583a51e Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Wed, 14 Jan 2015 14:56:34 -0500
Subject: [PATCH 6/7] Remember to pass the arguments to the exception handler.

---
 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