# must not be on AFS, since subprocesses won't be
# able to write to the logfiles do the to the AFS patch.
files = [os.path.join(os.path.join(log_dir, "%s.txt" % x)) for x in names]
+ old_reports = os.path.join(log_dir, "old-reports")
+ rundir = os.path.join(old_reports, "run")
+ if not os.path.exists(old_reports):
+ os.mkdir(old_reports)
+ else:
+ util.safe_unlink(rundir)
for f in files:
- util.safe_unlink(f)
+ if os.path.exists(f):
+ os.rename(f, rundir)
return (open(f, "w") for f in files)
class NullLogHandler(logging.Handler):