Refactoring.

This commit is contained in:
Alex Root Junior 2017-06-02 03:01:28 +03:00
parent 62e7bd1cbe
commit 07c7c1f32a
38 changed files with 313 additions and 243 deletions

View file

@ -5,7 +5,7 @@ class ValidationError(Exception):
class TelegramAPIError(Exception):
def __init__(self, message, method, status, body):
super(TelegramAPIError, self).__init__(
f"A request to the Telegram API was unsuccessful (Status code: {status}). {message}")
f"A request to the Telegram API was unsuccessful.\n{message}")
self.method = method
self.status = status
self.body = body