PEP8 and minor fixes

This commit is contained in:
Leandro Toledo 2015-08-08 19:35:44 -03:00
parent af9acb3328
commit ab88afc3d3
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ def read(*paths):
setup(
name='python-telegram-bot',
version='2.2',
version='2.3',
author='Leandro Toledo',
author_email='leandrotoledodesouza@gmail.com',
license='GPLv2',

View file

@ -585,7 +585,8 @@ class Bot(TelegramObject):
A JSON object.
"""
if method not in ('POST', 'GET'):
raise ValueError("Method '{}' is neither 'POST' nor 'GET'".format(method))
raise ValueError(
"Method '%s' is neither 'POST' nor 'GET'" % method)
if method == 'POST':
try:
@ -617,7 +618,6 @@ class Bot(TelegramObject):
except URLError as e:
raise TelegramError(str(e))
def _parseAndCheckTelegram(self,
json_data):
"""Try and parse the JSON returned from Telegram and return an empty