mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
Merge 5045f05107 into 8be17b0981
This commit is contained in:
commit
c1e1532ea1
1 changed files with 1 additions and 5 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue