mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-18 20:48:52 +02: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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user