Skip to content

Commit dbf9aca

Browse files
committed
Only clean the log file if it exists
1 parent 4c19ba4 commit dbf9aca

File tree

1 file changed

+3
-2
lines changed
  • utils/swift_build_support/swift_build_support

1 file changed

+3
-2
lines changed

utils/swift_build_support/swift_build_support/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ def log_time_path():
4242

4343

4444
def clear_log_time():
45-
f = open(log_time_path(), "w")
46-
f.close()
45+
if os.path.exists(log_time_path()):
46+
f = open(log_time_path(), "w")
47+
f.close()
4748

4849

4950
def log_time(event, command, duration=0):

0 commit comments

Comments
 (0)