Handle errors on rename of target file.
[apenwarr: this is the remaining part after part of the original was included in someone else's separate patch.]
This commit is contained in:
parent
c724523473
commit
f4b4c400b2
1 changed files with 4 additions and 2 deletions
|
|
@ -261,7 +261,9 @@ class BuildJob:
|
||||||
if e.errno == errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
unlink(t)
|
unlink(t)
|
||||||
else:
|
else:
|
||||||
raise
|
err('%s: can\'t save stdout to %r: %s\n' %
|
||||||
|
(self.argv[2], t, e.strerror))
|
||||||
|
rv = 1000
|
||||||
if st2:
|
if st2:
|
||||||
os.unlink(self.tmpname2)
|
os.unlink(self.tmpname2)
|
||||||
else: # no output generated at all; that's ok
|
else: # no output generated at all; that's ok
|
||||||
|
|
@ -288,7 +290,7 @@ class BuildJob:
|
||||||
sf.save()
|
sf.save()
|
||||||
f.close()
|
f.close()
|
||||||
if rv != 0:
|
if rv != 0:
|
||||||
err('%s: exit code %d\n' % (_nice(t),rv))
|
err('%s: exit code %r\n' % (_nice(t),rv))
|
||||||
else:
|
else:
|
||||||
if vars.VERBOSE or vars.XTRACE or vars.DEBUG:
|
if vars.VERBOSE or vars.XTRACE or vars.DEBUG:
|
||||||
log('%s (done)\n\n' % _nice(t))
|
log('%s (done)\n\n' % _nice(t))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue