From 5000e4e1480b128b1cf29687b652cecd42e2eb54 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Tue, 3 Jun 2008 12:33:29 +0000 Subject: [PATCH] A less confusing version of the last fix. --- osc/babysitter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/osc/babysitter.py b/osc/babysitter.py index 947dfadc..41481bf9 100644 --- a/osc/babysitter.py +++ b/osc/babysitter.py @@ -75,16 +75,14 @@ def run(prg): if hasattr(e, 'osc_msg'): print >>sys.stderr, e.osc_msg - body = None + body = e.read() if getattr(prg.options, 'debug', None) or \ getattr(prg.conf, 'config', {}).get('debug', None): print >>sys.stderr, e.hdrs - body = e.read() print >>sys.stderr, body if e.code == 400: - msg = body or e.read() - msg = msg.split('')[1] + msg = body.split('')[1] msg = msg.split('')[0] print >>sys.stderr, msg