diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc6d16..e3ce59b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Version 3.1.2 +# 4 May 2019 + +- Fix a crash that could occur during cleanup on unusual filesystems on + Python 2. Note that Python 2 is still not supported...but might as well fix + stuff if it is easy to fix. :-) Resolves #221. + # Version 3.1.1 ## 22 April 2019 diff --git a/green/VERSION b/green/VERSION index 94ff29c..ef538c2 100644 --- a/green/VERSION +++ b/green/VERSION @@ -1 +1 @@ -3.1.1 +3.1.2 diff --git a/green/process.py b/green/process.py index 781a591..e474118 100644 --- a/green/process.py +++ b/green/process.py @@ -270,7 +270,10 @@ def cleanup(): # Restore the state of the temp directory # TODO: Make this not necessary on macOS+Python3 (see #173) if sys.version_info[0] == 2: - shutil.rmtree(tempfile.tempdir, ignore_errors=True) + try: + shutil.rmtree(tempfile.tempdir, ignore_errors=True) + except: + pass tempfile.tempdir = saved_tempdir queue.put(None) # Finish coverage