fix(data_dir): empty dir check if path exists before remove
Python Lint CI / ty (push) Successful in 2m7s
Docker CI / docker-build (push) Successful in 2m59s
Python Lint CI / ruff-format-check (push) Successful in 2m10s
Python Lint CI / ruff (push) Successful in 2m10s
Python Test CI / coverage (push) Successful in 6m32s
Python Lint CI / ty (push) Successful in 2m7s
Docker CI / docker-build (push) Successful in 2m59s
Python Lint CI / ruff-format-check (push) Successful in 2m10s
Python Lint CI / ruff (push) Successful in 2m10s
Python Test CI / coverage (push) Successful in 6m32s
This commit is contained in:
+2
-1
@@ -99,7 +99,8 @@ class DataDir:
|
||||
self.logger.debug("Deleted %s", target_path)
|
||||
|
||||
def empty(self, path: str) -> None:
|
||||
self.remove(path)
|
||||
if self.exists(path):
|
||||
self.remove(path)
|
||||
target_path = self.root_path / path
|
||||
target_path.mkdir()
|
||||
self.logger.debug("Created empty %s", target_path)
|
||||
|
||||
Reference in New Issue
Block a user