1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
Merge develop to receive the Python3 compatible version of pyTelegramBotAPI.
This commit is contained in:
pieter
2015-07-01 18:29:29 +02:00
4 changed files with 9 additions and 6 deletions

View File

@ -145,11 +145,13 @@ def check_result(func_name, result):
raise ApiError(func_name + r' error.', result)
return result_json
def convert_markup(markup):
if not isinstance(markup, types.Jsonable):
return markup.to_json()
return markup
class ApiError(Exception):
def __init__(self, message, result):
super(ApiError, self).__init__(message)