[Pkg-gnupg-commit] [gpgme] 89/412: python: Fix name of exception, make slot methods explicit.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:22 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 af9371eb63664c92fb67e8e7e03cc984e7d38a7f
Author: Justus Winter <justus at gnupg.org>
Date: Thu May 12 12:51:30 2016 +0200
python: Fix name of exception, make slot methods explicit.
* lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception,
add docstring.
(GpgmeWrapper._getnameprepend): New function.
(GpgmeWrapper._errorcheck): Likewise.
Signed-off-by: Justus Winter <justus at gnupg.org>
---
lang/python/pyme/util.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/lang/python/pyme/util.py b/lang/python/pyme/util.py
index 32e2f55..19bbb7f 100644
--- a/lang/python/pyme/util.py
+++ b/lang/python/pyme/util.py
@@ -50,7 +50,24 @@ class GpgmeWrapper(object):
return repr(self.wrapped) == repr(other.wrapped)
def _getctype(self):
- raise NotImplementedException
+ """Must be implemented by child classes.
+
+ Must return the name of the c type."""
+ raise NotImplementedError()
+
+ def _getnameprepend(self):
+ """Must be implemented by child classes.
+
+ Must return the prefix of all c functions mapped to methods of
+ this class."""
+ raise NotImplementedError()
+
+ def _errorcheck(self, name):
+ """Must be implemented by child classes.
+
+ This function must return a trueish value for all c functions
+ returning gpgme_error_t."""
+ raise NotImplementedError()
def __getattr__(self, name):
"""On-the-fly function generation."""
--
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