mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 07:06:26 +01:00
remove checking for non 200 http codes, exceptions already handle it
This commit is contained in:
parent
9eec34edd1
commit
c3bca9af48
1 changed files with 2 additions and 4 deletions
|
@ -43,9 +43,7 @@ class Botan(object):
|
|||
request = Request(url,
|
||||
data=data.encode(),
|
||||
headers={'Content-Type': 'application/json'})
|
||||
response = urlopen(request)
|
||||
if response.getcode() != 200:
|
||||
return False
|
||||
urlopen(request)
|
||||
return True
|
||||
except HTTPError as error:
|
||||
self.logger.warn('Botan track error ' +
|
||||
|
@ -53,5 +51,5 @@ class Botan(object):
|
|||
':' + error.read().decode('utf-8'))
|
||||
return False
|
||||
except URLError as error:
|
||||
self.logger.warn('Botan track error ' + error.reason)
|
||||
self.logger.warn('Botan track error ' + str(error.reason))
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue