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.
This commit is contained in:
Martin Gracik 2011-10-03 12:18:41 +02:00
parent 049d73874c
commit 30f48041fc

View File

@ -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