mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-14 16:26: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:
parent
5a8baf9b88
commit
51e6fca88f
@ -279,7 +279,7 @@ class Fetcher:
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
except URLGrabError as e:
|
except URLGrabError as e:
|
||||||
# Not found is okay, let's go to the next project
|
# 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)
|
print("Invalid answer from server", e, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user