python: Fix name of exception, make slot methods explicit.
authorJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 10:51:30 +0000 (12:51 +0200)
committerJustus Winter <justus@gnupg.org>
Thu, 12 May 2016 10:59:05 +0000 (12:59 +0200)
* lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception,
add docstring.
(GpgmeWrapper._getnameprepend): New function.
(GpgmeWrapper._errorcheck): Likewise.

Signed-off-by: Justus Winter <justus@gnupg.org>
lang/python/pyme/util.py

index 32e2f55..19bbb7f 100644 (file)
@@ -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."""