From 1ee327e0f79f34011693bc71b61f70cdf476425c Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Mon, 3 Oct 2011 12:18:41 +0200 Subject: [PATCH] Ignore remove errors On some nfs mounts the shutil.rmtree may traceback when removing some files. This is not such a problem so we can ignore these errors and continue. --- src/pylorax/yumhelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/yumhelper.py b/src/pylorax/yumhelper.py index 04ad1402..904fdc29 100644 --- a/src/pylorax/yumhelper.py +++ b/src/pylorax/yumhelper.py @@ -117,7 +117,7 @@ class LoraxYumHelper(object): if os.path.islink(fname) or os.path.isfile(fname): os.unlink(fname) else: - shutil.rmtree(fname) + shutil.rmtree(fname, ignore_errors=True) logger.debug("removed {0}".format(fname)) count += 1