Skip to content

Commit

Permalink
Revert "Always cleanup, always ignore errors. For #228" because it br…
Browse files Browse the repository at this point in the history
…eaks many versions of Python 3 on Linux and macOS.

This reverts commit 14d360b.
  • Loading branch information
CleanCut committed Aug 10, 2020
1 parent 14d360b commit 83bbb54
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions green/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,13 @@ def raise_internal_failure(msg):
cleanup()

def cleanup():
# Restore the state of the temp directory. NOTE: Known to fail on macOS+Python3 or Python2
try:
shutil.rmtree(tempfile.tempdir, ignore_errors=True)
except:
pass
# Restore the state of the temp directory
# TODO: Make this not necessary on macOS+Python3 (see #173)
if sys.version_info[0] == 2:
try:
shutil.rmtree(tempfile.tempdir, ignore_errors=True)
except:
pass
tempfile.tempdir = saved_tempdir
queue.put(None)
# Finish coverage
Expand Down

0 comments on commit 83bbb54

Please sign in to comment.