Check if the file we want to remove exists
If we have directory symlinks, some files could have already been removed and we get a traceback. This prevents the traceback.
This commit is contained in:
parent
33688a99f2
commit
7fddbc3b09
@ -116,6 +116,10 @@ class LoraxYumHelper(object):
|
||||
fullpattern = joinpaths(self.installroot, pattern)
|
||||
count = 0
|
||||
for fname in glob.glob(fullpattern):
|
||||
# if there are symlinks, we could already removed the file
|
||||
if not os.path.exists(fname):
|
||||
continue
|
||||
|
||||
if os.path.islink(fname) or os.path.isfile(fname):
|
||||
os.unlink(fname)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user