On 03/19/2009 06:42 PM, David Lehman wrote:
On Thu, 2009-03-19 at 18:17 -1000, David Cantrell wrote:
Be more defensive about what we get back from the _isys module. Do
not assume we get an error string. If it's empty, place None in the
tuple.
Ack.
Applied and pushed, thanks.
---
isys/isys.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/isys/isys.c b/isys/isys.c
index 0813e50..65ee688 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -291,7 +291,14 @@ static PyObject * doMount(PyObject * s, PyObject * args) {
PyObject *tuple = PyTuple_New(2);
PyTuple_SetItem(tuple, 0, PyInt_FromLong(rc));
- PyTuple_SetItem(tuple, 1, PyString_FromString(err));
+
+ if (err == NULL) {
+ Py_INCREF(Py_None);
+ PyTuple_SetItem(tuple, 1, Py_None);
+ } else {
+ PyTuple_SetItem(tuple, 1, PyString_FromString(err));
+ }
+
PyErr_SetObject(PyExc_SystemError, tuple);
}
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list