clean.do: cleanup *.tmp files that might have been left lying around.
...and fix a bug where builder.py can't handle it if its temp file is deleted out from under it.
This commit is contained in:
parent
b9987433c9
commit
49f0a041b2
2 changed files with 8 additions and 1 deletions
|
|
@ -211,7 +211,13 @@ class BuildJob:
|
|||
os.rename(self.tmpname2, t)
|
||||
os.unlink(self.tmpname1)
|
||||
elif st1.st_size > 0:
|
||||
os.rename(self.tmpname1, t)
|
||||
try:
|
||||
os.rename(self.tmpname1, t)
|
||||
except OSError, e:
|
||||
if e.errno == errno.ENOENT:
|
||||
unlink(t)
|
||||
else:
|
||||
raise
|
||||
if st2:
|
||||
os.unlink(self.tmpname2)
|
||||
else: # no output generated at all; that's ok
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue