1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-12 23:56:13 +01:00

- fetch: check if errno == 14 before accessing the URLGrabError's code attribute

Unfortunately the class URLGrabError does not define constants for the
different error codes therefore we have to hardcode the errno (alternatively
we can define them in our fetch module).
This commit is contained in:
Marcus Huewe 2013-04-22 15:54:55 +02:00
parent 5a8baf9b88
commit 51e6fca88f

View File

@ -279,7 +279,7 @@ class Fetcher:
sys.exit(0)
except URLGrabError as e:
# Not found is okay, let's go to the next project
if e.code != 404:
if e.errno == 14 and e.code != 404:
print("Invalid answer from server", e, file=sys.stderr)
sys.exit(1)