python: Handle the when case __doc__ is None.
* lang/python/src/core.py (GpgmeWrapper): Check if None. -- GnuPG-bug-id: 5075 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
74c8131d80
commit
089164a0c0
@ -147,7 +147,12 @@ class GpgmeWrapper(object):
|
||||
gpgme.gpg_raise_callback_exception(slf)
|
||||
return result
|
||||
|
||||
doc = self._munge_docstring.sub(r'\2.\1(\3', getattr(func, "__doc__"))
|
||||
doc_orig = getattr(func, "__doc__")
|
||||
if doc_orig:
|
||||
doc = self._munge_docstring.sub(r'\2.\1(\3', doc_orig)
|
||||
else:
|
||||
doc = None
|
||||
|
||||
_funcwrap.__doc__ = doc
|
||||
|
||||
# Monkey-patch the class.
|
||||
|
Loading…
Reference in New Issue
Block a user