diff --git a/snakemake_executor_plugin_slurm/utils.py b/snakemake_executor_plugin_slurm/utils.py index 7f91c7e..33d6e36 100644 --- a/snakemake_executor_plugin_slurm/utils.py +++ b/snakemake_executor_plugin_slurm/utils.py @@ -27,7 +27,9 @@ def delete_empty_dirs(path: Path) -> list: """ # get a list of all directorys in path and subpaths - def get_dirs(path: Path, result=[]): + def get_dirs(path: Path, result=None): + if result is None: + result = [] for p in path.iterdir(): if p.is_dir(): result.append(p)