1234567891011121314151617181920212223242526 |
- class Error(Exception):
- def __init__(self, message=None):
- super(Error, self).__init__(message)
- class PermissionError(Error):
- pass
- class NotFoundError(Error):
- pass
- class InvalidInput(Error):
- pass
- class ArbitraryError(Error):
- def __init__(self, response):
- text = response.text[:46] + ' ...' if len(response.text) > 50 else response.text
- message = 'http_status="{}" response="{}"'.format(response.status_code, text)
- super(ArbitraryError, self).__init__(message)
- class Timeout(Error):
- pass
|