1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 01:46:13 +01:00

- globally catch OSError ENOENT

This commit is contained in:
Marcus Huewe 2011-02-01 18:25:23 +01:00
parent 40af804c17
commit bb02a34622
2 changed files with 6 additions and 4 deletions

View File

@ -133,6 +133,12 @@ def run(prg):
raise raise
return 1 return 1
except OSError, e:
if e.errno != errno.ENOENT:
raise
print >>sys.stderr, e
return 1
except (oscerr.ConfigError, oscerr.NoConfigfile), e: except (oscerr.ConfigError, oscerr.NoConfigfile), e:
print >>sys.stderr, e.msg print >>sys.stderr, e.msg
return 1 return 1

View File

@ -865,10 +865,6 @@ def main(apiurl, opts, argv):
print "keyboard interrupt, killing build ..." print "keyboard interrupt, killing build ..."
subprocess.call(cmd + ["--kill"]) subprocess.call(cmd + ["--kill"])
raise i 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') pacdir = os.path.join(build_root, '.build.packages')
if os.path.islink(pacdir): if os.path.islink(pacdir):