mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Only remove folders if they exist in tmpdir
This commit is contained in:
parent
3841f27aab
commit
ea005517cf
@ -69,7 +69,8 @@ class TmpDir(Location):
|
||||
"""Delete this folder and all contained files."""
|
||||
LOGGER.debug("Deleting temp folder %s", self.path)
|
||||
|
||||
shutil.rmtree(self.path.resolve())
|
||||
if self.path.resolve().exists():
|
||||
shutil.rmtree(self.path.resolve())
|
||||
|
||||
def _inc_and_get_counter(self) -> int:
|
||||
"""Get and increment the counter by one."""
|
||||
|
Loading…
Reference in New Issue
Block a user