diff options
| author | Justus Winter <[email protected]> | 2016-06-02 13:32:35 +0000 | 
|---|---|---|
| committer | Justus Winter <[email protected]> | 2016-06-06 12:16:04 +0000 | 
| commit | 89eb0cd4d65bc033ed6342810b26232797482d64 (patch) | |
| tree | 0936d8e28a1d5cc704425c8fbb85158d49ef5730 | |
| parent | python: Initialize GPGME for the user. (diff) | |
| download | gpgme-89eb0cd4d65bc033ed6342810b26232797482d64.tar.gz gpgme-89eb0cd4d65bc033ed6342810b26232797482d64.zip | |
python: Fix error handling.
* lang/python/gpgme.i (object_to_gpgme_t): Properly propagate
exceptions.
Signed-off-by: Justus Winter <[email protected]>
| -rw-r--r-- | lang/python/gpgme.i | 9 | 
1 files changed, 1 insertions, 8 deletions
| diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i index 4c020ff4..0d1322c5 100644 --- a/lang/python/gpgme.i +++ b/lang/python/gpgme.i @@ -96,14 +96,7 @@ PyObject* object_to_gpgme_t(PyObject* input, const char* objtype, int argnum) {          }      }    else -    { -      PyErr_Format(PyExc_TypeError, -                   "Protocol violation: Expected an instance of type str " -                   "from _getctype, but got %s", -                   pyname == NULL ? "NULL" -                   : (pyname == Py_None ? "None" : pyname->ob_type->tp_name)); -      return NULL; -    } +    return NULL;    Py_DECREF(pyname);    pypointer = PyObject_GetAttrString(input, "wrapped"); | 
