[Pkg-gnupg-commit] [gpgme] 112/412: python: Fix import.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:27 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 07f71cd17706093ca6b1507c41609356d479ae9f
Author: Justus Winter <justus at gnupg.org>
Date: Thu May 19 10:49:43 2016 +0200
python: Fix import.
* lang/python/helpers.c (pygpgme_exception_init): Make module import
relative.
Signed-off-by: Justus Winter <justus at gnupg.org>
---
lang/python/helpers.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lang/python/helpers.c b/lang/python/helpers.c
index 96c844f..285b1da 100644
--- a/lang/python/helpers.c
+++ b/lang/python/helpers.c
@@ -29,7 +29,10 @@ static PyObject *GPGMEError = NULL;
void pygpgme_exception_init(void) {
if (GPGMEError == NULL) {
PyObject *errors;
- errors = PyImport_ImportModule("errors");
+ PyObject *from_list = PyList_New(0);
+ errors = PyImport_ImportModuleLevel("errors", PyEval_GetGlobals(),
+ PyEval_GetLocals(), from_list, 1);
+ Py_XDECREF(from_list);
if (errors) {
GPGMEError=PyDict_GetItemString(PyModule_GetDict(errors), "GPGMEError");
Py_XINCREF(GPGMEError);
--
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