mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
make telebot compatible with python3
also two small PEP8 fixes
This commit is contained in:
@ -133,12 +133,14 @@ def check_result(func_name, result):
|
||||
raise ApiError(func_name + r' error.', result)
|
||||
return result_json
|
||||
|
||||
|
||||
def convert_markup(markup):
|
||||
if isinstance(markup, types.ReplyKeyboardMarkup):
|
||||
return markup.to_json()
|
||||
else:
|
||||
return markup
|
||||
|
||||
|
||||
class ApiError(Exception):
|
||||
def __init__(self, message, result):
|
||||
super(ApiError, self).__init__(message)
|
||||
|
Reference in New Issue
Block a user