[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
49bf3a3834
commit
d3407fe624
|
@ -268,9 +268,7 @@ def maybe_delete_a_numbered_dir(path: Path) -> None:
|
||||||
lock_path = None
|
lock_path = None
|
||||||
try:
|
try:
|
||||||
lock_path = create_cleanup_lock(path)
|
lock_path = create_cleanup_lock(path)
|
||||||
with tempfile.TemporaryDirectory(
|
with tempfile.TemporaryDirectory(prefix="garbage-", dir=path.parent) as garbage:
|
||||||
prefix="garbage-", dir=path.parent
|
|
||||||
) as garbage:
|
|
||||||
path.replace(garbage)
|
path.replace(garbage)
|
||||||
except OSError:
|
except OSError:
|
||||||
# known races:
|
# known races:
|
||||||
|
|
Loading…
Reference in New Issue