1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-04 10:36:17 +01:00

Nothing guarantees that HTTPError has read method.

This commit is contained in:
Michal Čihař 2010-07-07 16:29:59 +02:00
parent 9fadbb42fd
commit 8e48815f54

View File

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