From cda27ec20beefe858012575a65cee6007f8019a1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 24 Nov 2013 15:01:26 +0100 Subject: [PATCH] Patch for an Issue #563 --- lib/core/purge.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/purge.py b/lib/core/purge.py index 345655032..007822de5 100644 --- a/lib/core/purge.py +++ b/lib/core/purge.py @@ -75,4 +75,8 @@ def purge(directory): logger.debug("deleting the whole directory tree") os.chdir(os.path.join(directory, "..")) - shutil.rmtree(directory) + + try: + shutil.rmtree(directory) + except OSError, ex: + logger.error("problem occurred while removing directory '%s' ('%s')" % (directory, ex))