|
|
8ea12d |
From 603534d12ed52405e9f464f9608fea725583a51e Mon Sep 17 00:00:00 2001
|
|
|
8ea12d |
From: Chris Lumens <clumens@redhat.com>
|
|
|
8ea12d |
Date: Wed, 14 Jan 2015 14:56:34 -0500
|
|
|
8ea12d |
Subject: [PATCH 6/7] Remember to pass the arguments to the exception handler.
|
|
|
8ea12d |
|
|
|
8ea12d |
---
|
|
|
8ea12d |
src/_pedmodule.c | 4 ++--
|
|
|
8ea12d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
8ea12d |
|
|
|
8ea12d |
diff --git a/src/_pedmodule.c b/src/_pedmodule.c
|
|
|
8ea12d |
index a048d91..cfe2dd8 100644
|
|
|
8ea12d |
--- a/src/_pedmodule.c
|
|
|
8ea12d |
+++ b/src/_pedmodule.c
|
|
|
8ea12d |
@@ -407,7 +407,7 @@ static PedExceptionOption partedExnHandler(PedException *e) {
|
|
|
8ea12d |
PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
|
|
|
8ea12d |
PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
|
|
|
8ea12d |
|
|
|
8ea12d |
- retval = PyObject_CallObject(exn_handler, NULL);
|
|
|
8ea12d |
+ retval = PyObject_CallObject(exn_handler, args);
|
|
|
8ea12d |
Py_DECREF(args);
|
|
|
8ea12d |
if (retval != NULL && (PyLong_AsLong(retval) == PED_EXCEPTION_UNHANDLED || (PyLong_AsLong(retval) & e->options) > 0))
|
|
|
8ea12d |
return PyLong_AsLong(retval);
|
|
|
8ea12d |
@@ -445,7 +445,7 @@ static PedExceptionOption partedExnHandler(PedException *e) {
|
|
|
8ea12d |
PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
|
|
|
8ea12d |
PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
|
|
|
8ea12d |
|
|
|
8ea12d |
- retval = PyObject_CallObject(exn_handler, NULL);
|
|
|
8ea12d |
+ retval = PyObject_CallObject(exn_handler, args);
|
|
|
8ea12d |
Py_DECREF(args);
|
|
|
8ea12d |
if (retval != NULL && (PyLong_AsLong(retval) == PED_EXCEPTION_UNHANDLED || (PyLong_AsLong(retval) & e->options) > 0))
|
|
|
8ea12d |
return PyLong_AsLong(retval);
|
|
|
8ea12d |
--
|
|
|
8ea12d |
2.4.0
|
|
|
8ea12d |
|