mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 21:58:41 +02:00
Nothing guarantees that HTTPError has read method.
This commit is contained in:
@@ -104,7 +104,11 @@ def run(prg):
|
||||
if hasattr(e, 'osc_msg'):
|
||||
print >>sys.stderr, e.osc_msg
|
||||
|
||||
body = e.read()
|
||||
try:
|
||||
body = e.read()
|
||||
except AttributeError:
|
||||
body = ''
|
||||
|
||||
if getattr(prg.options, 'debug', None) or \
|
||||
getattr(prg.conf, 'config', {}).get('debug', None):
|
||||
print >>sys.stderr, e.hdrs
|
||||
|
Reference in New Issue
Block a user