From bb02a34622d733c4a11adea65f08def0d57a0ac6 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Tue, 1 Feb 2011 18:25:23 +0100 Subject: [PATCH] - globally catch OSError ENOENT --- osc/babysitter.py | 6 ++++++ osc/build.py | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/osc/babysitter.py b/osc/babysitter.py index 9b87c876..364803d8 100644 --- a/osc/babysitter.py +++ b/osc/babysitter.py @@ -133,6 +133,12 @@ def run(prg): raise return 1 + except OSError, e: + if e.errno != errno.ENOENT: + raise + print >>sys.stderr, e + return 1 + except (oscerr.ConfigError, oscerr.NoConfigfile), e: print >>sys.stderr, e.msg return 1 diff --git a/osc/build.py b/osc/build.py index a66beb35..2fd37e17 100644 --- a/osc/build.py +++ b/osc/build.py @@ -865,10 +865,6 @@ def main(apiurl, opts, argv): print "keyboard interrupt, killing build ..." subprocess.call(cmd + ["--kill"]) raise i - except Exception, e: - # 'No such file or directory' should not trigger a stack trace - print "Exception: " + str(e) - sys.exit(1) pacdir = os.path.join(build_root, '.build.packages') if os.path.islink(pacdir):