diff options
author | Simon McVittie <smcv@debian.org> | 2010-12-02 17:39:08 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2010-12-02 17:39:08 +0000 |
commit | 59a0ea47f343da7626ea6f10f661a942f8eb284a (patch) | |
tree | c7f692d6a4a5206cb004722827dedac90f3d3056 | |
parent | 28880468dddbb0e063d80dd003145a6322238507 (diff) | |
download | dbus-python-59a0ea47f343da7626ea6f10f661a942f8eb284a.tar.gz |
DBusPyException_ConsumeError: check whether the constructor failed
-rw-r--r-- | _dbus_bindings/exceptions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/_dbus_bindings/exceptions.c b/_dbus_bindings/exceptions.c index 3b42227..fe09620 100644 --- a/_dbus_bindings/exceptions.c +++ b/_dbus_bindings/exceptions.c @@ -75,6 +75,11 @@ DBusPyException_ConsumeError(DBusError *error) "s", error->message ? error->message : ""); + + if (!exc_value) { + goto finally; + } + if (error->name) { PyObject *name = PyString_FromString(error->name); int ret; |