API: don't fail on missing 'doc' property

This commit is contained in:
rolux 2013-11-23 15:17:59 +01:00
parent d664d99f89
commit 6f68729b6f

View file

@ -56,7 +56,8 @@ class API(object):
else: else:
kw = None kw = None
return self._request(action, kw) return self._request(action, kw)
method.__doc__ = self._properties[action]['doc'] if 'doc' in self._properties[action]:
method.__doc__ = self._properties[action]['doc']
method.func_name = str(action) method.func_name = str(action)
self._add_method(method, action) self._add_method(method, action)