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:
parent
049d73874c
commit
30f48041fc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user