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@gnupg.org>
This commit is contained in:
parent
ce5121ad53
commit
af9371eb63
@ -50,7 +50,24 @@ class GpgmeWrapper(object):
|
|||||||
return repr(self.wrapped) == repr(other.wrapped)
|
return repr(self.wrapped) == repr(other.wrapped)
|
||||||
|
|
||||||
def _getctype(self):
|
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):
|
def __getattr__(self, name):
|
||||||
"""On-the-fly function generation."""
|
"""On-the-fly function generation."""
|
||||||
|
Loading…
Reference in New Issue
Block a user