Skip to content

Commit

Permalink
- fetch: check if errno == 14 before accessing the URLGrabError's cod…
Browse files Browse the repository at this point in the history
…e 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).
  • Loading branch information
marcus-h committed Apr 22, 2013
1 parent 5a8baf9 commit 51e6fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osc/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def run(self, buildinfo):
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)

Expand Down

0 comments on commit 51e6fca

Please sign in to comment.