Skip to content

Commit

Permalink
exists() -> is_dir()
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 authored Jun 27, 2024
1 parent b04d54b commit b37ee28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spikeinterface/preprocessing/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ def correct_motion(
if folder is not None:
folder = Path(folder)
if overwrite:
if folder.exists():
if folder.is_dir():
import shutil

shutil.rmtree(folder)
else:
assert not folder.exists(), f"Folder {folder} already exists"
assert not folder.is_dir(), f"Folder {folder} already exists"

folder.mkdir(exist_ok=True, parents=True)

Expand Down

0 comments on commit b37ee28

Please sign in to comment.