From 38d4f5b4c985f1d865f1538b15fe9b436de19970 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Tue, 3 Nov 2020 20:09:54 +0100 Subject: [PATCH] Do not fail only empty courses --- PFERD/organizer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PFERD/organizer.py b/PFERD/organizer.py index 1665f23..87bc684 100644 --- a/PFERD/organizer.py +++ b/PFERD/organizer.py @@ -124,6 +124,8 @@ class Organizer(Location): self._cleanup(self.path) def _cleanup(self, start_dir: Path) -> None: + if not start_dir.exists(): + return paths: List[Path] = list(start_dir.iterdir()) # Recursively clean paths