1
0
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:
Marcus Huewe 2014-06-08 22:32:35 +02:00
parent a754164067
commit fdfbcdc6eb

View File

@ -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: