Skip to content

Commit 7f223cc

Browse files
author
dtopuzov
committed
Retry delete temp log file on failure (we had some issues in Win OS)
1 parent 0f3aefe commit 7f223cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/osutils/command.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ def fork_it():
3737
os.system(command)
3838

3939
# remove output.txt
40-
File.remove(OUTPUT_FILE)
40+
try:
41+
File.remove(OUTPUT_FILE)
42+
except OSError as err:
43+
print "Failed to delete " + OUTPUT_FILE
44+
time.sleep(1)
45+
File.remove(OUTPUT_FILE)
4146

4247
# append to commads.txt
4348
File.append(TEST_LOG, command)

0 commit comments

Comments
 (0)