Skip to content

Commit

Permalink
Preliminary cleaning of the ./file dir under Win or if the flag noSyn…
Browse files Browse the repository at this point in the history
…c is set (#121)

* Preliminary cleaning of temporary file dir added (win only)

* noSync flag added to the preliminary clean of temporary files
  • Loading branch information
AndreaBartolini authored Sep 25, 2024
1 parent 1d63568 commit cee4043
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ def print_linenum(signum, frame):
if not isWin:
signal.signal(signal.SIGUSR1, print_linenum)

if isWin or noSync:
# delete temporary ./files to avoid moving of old results (win does not use rsync)
try:
rmtree("./files")
print("Cleaned files directory")
except OSError:
pass
try:
os.mkdir("files")
except OSError:
pass
print("Created files directory")
sys.stdout.flush()

def runCommand(cmd, prefix, timeout):
process = [None]
def target():
Expand Down

0 comments on commit cee4043

Please sign in to comment.