pull/3328/merge
Tomer Shalev 2025-06-23 12:43:40 +00:00 committed by GitHub
commit ab536e6bec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -231,12 +231,8 @@ def with_tmpdir(f):
"""
@wraps(f)
def wrapper(self, *args, **kwargs):
tmp = tempfile.mkdtemp(prefix="f2b-temp")
try:
with tempfile.TemporaryDirectory(prefix="f2b-temp") as tmp:
return f(self, tmp, *args, **kwargs)
finally:
# clean up
shutil.rmtree(tmp)
return wrapper
def with_alt_time(f):