mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
- babysitter: catch URLGrabError exception
This commit is contained in:
parent
a754164067
commit
fdfbcdc6eb
@ -11,6 +11,7 @@ import pdb
|
||||
import sys
|
||||
import signal
|
||||
import traceback
|
||||
from urlgrabber.grabber import URLGrabError
|
||||
|
||||
from osc import oscerr
|
||||
from .oscsslexcp import NoSecureSSLError
|
||||
@ -140,6 +141,9 @@ def run(prg, argv=None):
|
||||
except URLError as e:
|
||||
print('Failed to reach a server:\n', e.reason, file=sys.stderr)
|
||||
return 1
|
||||
except URLGrabError as e:
|
||||
print('Failed to grab %s: %s' % (e.url, e.exception), file=sys.stderr)
|
||||
return 1
|
||||
except IOError as e:
|
||||
# ignore broken pipe
|
||||
if e.errno != errno.EPIPE:
|
||||
|
Loading…
Reference in New Issue
Block a user