This commit is contained in:
Tomer Shalev 2026-02-17 06:31:07 -08:00 committed by GitHub
commit c1e1532ea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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):