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

Fix failing test case in Py2.6 because of using {} instead of {0..9}

This commit is contained in:
pieter 2015-09-08 22:34:55 +02:00
parent 55053fe413
commit 99f6829ede
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ class TeleBot:
if update.update_id > self.last_update_id: if update.update_id > self.last_update_id:
self.last_update_id = update.update_id self.last_update_id = update.update_id
new_messages.append(update.message) new_messages.append(update.message)
logger.debug('Received {} new messages'.format(len(new_messages))) logger.debug('Received {0} new messages'.format(len(new_messages)))
if len(new_messages) > 0: if len(new_messages) > 0:
self.process_new_messages(new_messages) self.process_new_messages(new_messages)

View File

@ -19,9 +19,9 @@ def _make_request(token, method_name, method='get', params=None, files=None):
:return: The result parsed to a JSON dictionary. :return: The result parsed to a JSON dictionary.
""" """
request_url = telebot.API_URL + 'bot' + token + '/' + method_name request_url = telebot.API_URL + 'bot' + token + '/' + method_name
logger.debug("Request: method={} url={} params={} files={}".format(method, request_url, params, files)) logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files))
result = requests.request(method, request_url, params=params, files=files) result = requests.request(method, request_url, params=params, files=files)
logger.debug("The server returned: '{}'".format(result.text)) logger.debug("The server returned: '{0}'".format(result.text))
return _check_result(method_name, result)['result'] return _check_result(method_name, result)['result']