diff --git a/telegram/utils/botan.py b/telegram/utils/botan.py index 37c8c928f..1c6b774c3 100644 --- a/telegram/utils/botan.py +++ b/telegram/utils/botan.py @@ -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