Skip to content

Commit

Permalink
better cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brianolson committed Apr 13, 2022
1 parent dade5c5 commit 1357455
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/scripts/transition_mix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def main():
if not args.keep_temps:
# If we created a tmpdir and we're not keeping it, clean it up.
# If an outer process specified $TEMPDIR, let them clean it up.
atexit.register(shutil.rmtree, tempdir, onerror=logger.error)
atexit.register(shutil.rmtree, tempdir, onerror=lambda efn, epath, excinfo: logger.error('rmtree error %r %r %s', efn, epath, excinfo))
else:
atexit.register(print, 'keeping temps. to clean up:\nrm -rf {}'.format(tempdir))

Expand All @@ -402,6 +402,8 @@ def main():
# run_test(netdir, oldbin, newbin, algod_bins)
dt = time.time() - start
print('DONE OK {:.1f} seconds'.format(dt))
# wait a moment for terminated algod to clean up their files
time.sleep(1)
return 0

def nop(*args, **kwargs):
Expand Down

0 comments on commit 1357455

Please sign in to comment.