Skip to content
Snippets Groups Projects
Commit 4da6a6c1 authored by Simon Dreutter's avatar Simon Dreutter
Browse files

more robust Path bugfix

parent 8e70c59f
No related branches found
No related tags found
No related merge requests found
...@@ -438,6 +438,8 @@ DONT_DELETE = [ ...@@ -438,6 +438,8 @@ DONT_DELETE = [
# function to clean up temporary files if they are not in the DONT_DELETE list # function to clean up temporary files if they are not in the DONT_DELETE list
def cleanup(dataset): def cleanup(dataset):
if isinstance(dataset, str):
dataset = Path(dataset)
if dataset not in DONT_DELETE: if dataset not in DONT_DELETE:
if dataset.is_file(): if dataset.is_file():
dataset.unlink() dataset.unlink()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment