[Pkg-gnupg-commit] [gpgme] 158/412: python: Fix error handling.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit 89eb0cd4d65bc033ed6342810b26232797482d64
Author: Justus Winter <justus at g10code.com>
Date: Thu Jun 2 15:32:35 2016 +0200
python: Fix error handling.
* lang/python/gpgme.i (object_to_gpgme_t): Properly propagate
exceptions.
Signed-off-by: Justus Winter <justus at g10code.com>
---
lang/python/gpgme.i | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i
index 4c020ff..0d1322c 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");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list