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
21bbbe70e1
commit
1ee327e0f7
@ -117,7 +117,7 @@ class LoraxYumHelper(object):
|
|||||||
if os.path.islink(fname) or os.path.isfile(fname):
|
if os.path.islink(fname) or os.path.isfile(fname):
|
||||||
os.unlink(fname)
|
os.unlink(fname)
|
||||||
else:
|
else:
|
||||||
shutil.rmtree(fname)
|
shutil.rmtree(fname, ignore_errors=True)
|
||||||
|
|
||||||
logger.debug("removed {0}".format(fname))
|
logger.debug("removed {0}".format(fname))
|
||||||
count += 1
|
count += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user