Only remove folders if they exist in tmpdir

This commit is contained in:
I-Al-Istannen 2020-04-23 12:09:45 +02:00
parent 3841f27aab
commit ea005517cf

View File

@ -69,6 +69,7 @@ class TmpDir(Location):
"""Delete this folder and all contained files."""
LOGGER.debug("Deleting temp folder %s", self.path)
if self.path.resolve().exists():
shutil.rmtree(self.path.resolve())
def _inc_and_get_counter(self) -> int: