]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
transport: Catch 503 Bad Gateway HTTP errors.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 30 Mar 2013 12:18:39 +0000 (12:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 30 Mar 2013 12:18:39 +0000 (12:18 +0000)
python/pakfire/errors.py
python/pakfire/transport.py

index 87c64e33a03a717347e6d95a5285583238fba2e5..2da38227315ec947a4c62d81291e425dca14044d 100644 (file)
@@ -102,6 +102,10 @@ class TransportError(Error):
        pass
 
 
+class TransportBadGatewayError(TransportError):
+       pass
+
+
 class TransportConnectionError(TransportError):
        pass
 
index 1adb1c61a508611e6253c37b0727f485d8a54a9c..f301652d59ff35c19ffbbbb2e0373cc5eb323257 100644 (file)
@@ -260,6 +260,8 @@ class PakfireHubTransport(object):
                                        raise TransportNotFoundError, url
                                elif e.code == 500:
                                        raise TransportInternalServerError, url
+                               elif e.code == 503:
+                                       raise TransportBadGatewayError, url
                                elif e.code == 504:
                                        raise TransportConnectionTimeoutError, url