autopkgtest: Don't fail hard on 404 download errors

Dial back commit 570 a bit: We should tolerate 404's, something went wrong on
uploading the result. We still want to fail hard on any other error as these
would indicate infra problems.
bzr-import-20160707
Martin Pitt 9 years ago
parent d0337785d8
commit ac979a9e1e

@ -380,7 +380,11 @@ class AutoPackageTest(object):
raise NotImplementedError('fetch_one_result(%s): cannot handle HTTP code %i' %
(url, f.getcode()))
except IOError as e:
self.log_error('FATAL: Failure to fetch %s: %s' % (url, str(e)))
self.log_error('Failure to fetch %s: %s' % (url, str(e)))
# we tolerate "not found" (something went wrong on uploading the
# result), but other things indicate infrastructure problems
if hasattr(e, 'code') and e.code == 404:
return
sys.exit(1)
try:

Loading…
Cancel
Save