From f91bd60f3b7a21b7265ee78e9481ae1dfc2e64b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 26 Sep 2006 09:02:00 +0000 Subject: [PATCH] do not trace, but exit with 1 on upload error --- osc/othermethods.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/osc/othermethods.py b/osc/othermethods.py index 99610ed5..daa0c44b 100755 --- a/osc/othermethods.py +++ b/osc/othermethods.py @@ -80,7 +80,15 @@ def putfile(url, username, password, file=None, strbuf=None): pass if not buf: break - conn.send(buf) + + try: + conn.send(buf) + except: + print + print 'ERROR uploading %s' % file + print + os._exit(1) + fp.close() reply, msg, headers = conn.getreply()