From 6f68729b6fae843a8163e5e2c5c399edab4ff5e1 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 23 Nov 2013 15:17:59 +0100 Subject: [PATCH] API: don't fail on missing 'doc' property --- ox/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox/api.py b/ox/api.py index 9982bd7..64024bb 100644 --- a/ox/api.py +++ b/ox/api.py @@ -56,7 +56,8 @@ class API(object): else: kw = None 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) self._add_method(method, action)