mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-05 20:58:42 +02:00
Handle also errors which can sneak out of httplib
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user