diff --git a/osc/babysitter.py b/osc/babysitter.py index b263546e..43a222bc 100644 --- a/osc/babysitter.py +++ b/osc/babysitter.py @@ -9,6 +9,7 @@ import signal import errno from osc import oscerr from urllib2 import URLError, HTTPError +from httplib import HTTPException, BadStatusLine from oscsslexcp import NoSecureSSLError from osc.util.cpio import CpioError from osc.util.packagequery import PackageError @@ -123,6 +124,15 @@ def run(prg): return 1 + except BadStatusLine, e: + print >>sys.stderr, 'Server returned an invalid response:', e + print >>sys.stderr, e.line + return 1 + + except HTTPException, e: + print >>sys.stderr, e + return 1 + except URLError, e: print >>sys.stderr, 'Failed to reach a server:\n', e.reason return 1