Don't check as often whether the .redo directory exists.
Just check it once after running a subprocess: that's the only way it ought to be able to disappear (ie. in a 'make clean' setup).
This commit is contained in:
parent
29d6c9a746
commit
3ef2bd7300
5 changed files with 21 additions and 31 deletions
18
helpers.py
18
helpers.py
|
|
@ -15,24 +15,6 @@ def unlink(f):
|
|||
pass # it doesn't exist, that's what you asked for
|
||||
|
||||
|
||||
def mkdirp(d, mode=None):
|
||||
"""Recursively create directories on path 'd'.
|
||||
|
||||
Unlike os.makedirs(), it doesn't raise an exception if the last element of
|
||||
the path already exists.
|
||||
"""
|
||||
try:
|
||||
if mode:
|
||||
os.makedirs(d, mode)
|
||||
else:
|
||||
os.makedirs(d)
|
||||
except OSError, e:
|
||||
if e.errno == errno.EEXIST:
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
def log_(s):
|
||||
sys.stdout.flush()
|
||||
if vars.DEBUG_PIDS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue