aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-12 10:51:30 +0000
committerJustus Winter <[email protected]>2016-05-12 10:59:05 +0000
commitaf9371eb63664c92fb67e8e7e03cc984e7d38a7f (patch)
tree5ea61332c1523c9463feb9bc387fc27b974087f9
parentpython: Handle interpreter shutdown. (diff)
downloadgpgme-af9371eb63664c92fb67e8e7e03cc984e7d38a7f.tar.gz
gpgme-af9371eb63664c92fb67e8e7e03cc984e7d38a7f.zip
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 <[email protected]>
-rw-r--r--lang/python/pyme/util.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/lang/python/pyme/util.py b/lang/python/pyme/util.py
index 32e2f556..19bbb7f6 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."""