1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Implemented command decorator.

This commit is contained in:
pieter
2015-07-02 03:38:31 +02:00
parent b41330774b
commit 13133ac5c6
3 changed files with 59 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ def _make_request(token, method_name, method='get', params=None, files=None):
try:
result_json = result.json()
if not result_json['ok']:
raise ApiException(method_name, ' failed, result=' + result_json)
raise Exception()
except:
raise ApiException(method_name + r' error.', result)
return result_json['result']