Skip to content

Commit 9f3a2df

Browse files
committed
Fix Python 3.7 compat
1 parent e461ec6 commit 9f3a2df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/testing_support/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def NamedTemporaryFile(*args, **kwargs):
104104
def remove_on_exit(*args, **kwargs):
105105
original_exit(*args, **kwargs)
106106
# Clean up the file manually
107-
temp_file.path.unlink(missing_ok=True)
107+
if temp_file.path.exists():
108+
temp_file.path.unlink()
108109

109110
temp_file.__exit__ = remove_on_exit
110111

0 commit comments

Comments
 (0)