Introducing a ConnectionTimeout as a subclass of ConnectionError

This is to enable #128 to work
This commit is contained in:
Honza Král
2014-10-03 18:49:07 +02:00
parent f401d100a8
commit ecfeb93a6f
4 changed files with 20 additions and 3 deletions
+7
View File
@@ -61,6 +61,13 @@ class ConnectionError(TransportError):
self.error, self.info.__class__.__name__, self.info)
class ConnectionTimeout(ConnectionError):
""" A network timeout. """
def __str__(self):
return 'ConnectionTimeout caused by - %s(%s)' % (
self.info.__class__.__name__, self.info)
class NotFoundError(TransportError):
""" Exception representing a 404 status code. """