mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
PEP8 and minor fixes
This commit is contained in:
parent
af9acb3328
commit
ab88afc3d3
2 changed files with 3 additions and 3 deletions
2
setup.py
2
setup.py
|
@ -15,7 +15,7 @@ def read(*paths):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='python-telegram-bot',
|
name='python-telegram-bot',
|
||||||
version='2.2',
|
version='2.3',
|
||||||
author='Leandro Toledo',
|
author='Leandro Toledo',
|
||||||
author_email='leandrotoledodesouza@gmail.com',
|
author_email='leandrotoledodesouza@gmail.com',
|
||||||
license='GPLv2',
|
license='GPLv2',
|
||||||
|
|
|
@ -585,7 +585,8 @@ class Bot(TelegramObject):
|
||||||
A JSON object.
|
A JSON object.
|
||||||
"""
|
"""
|
||||||
if method not in ('POST', 'GET'):
|
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':
|
if method == 'POST':
|
||||||
try:
|
try:
|
||||||
|
@ -617,7 +618,6 @@ class Bot(TelegramObject):
|
||||||
except URLError as e:
|
except URLError as e:
|
||||||
raise TelegramError(str(e))
|
raise TelegramError(str(e))
|
||||||
|
|
||||||
|
|
||||||
def _parseAndCheckTelegram(self,
|
def _parseAndCheckTelegram(self,
|
||||||
json_data):
|
json_data):
|
||||||
"""Try and parse the JSON returned from Telegram and return an empty
|
"""Try and parse the JSON returned from Telegram and return an empty
|
||||||
|
|
Loading…
Reference in a new issue