Remove also broken symlinks
This commit is contained in:
parent
2fc71cc74e
commit
5f6c661d28
@ -87,7 +87,9 @@ class LoraxYumHelper(object):
|
|||||||
for pattern in pattern_list:
|
for pattern in pattern_list:
|
||||||
if fnmatch.fnmatch(fname, pattern):
|
if fnmatch.fnmatch(fname, pattern):
|
||||||
fullpath = joinpaths(self.installroot, fname)
|
fullpath = joinpaths(self.installroot, fname)
|
||||||
if os.path.isfile(fullpath):
|
if (os.path.islink(fullpath) or
|
||||||
|
os.path.isfile(fullpath)):
|
||||||
|
|
||||||
os.unlink(fullpath)
|
os.unlink(fullpath)
|
||||||
logger.debug("removed {0}".format(fullpath))
|
logger.debug("removed {0}".format(fullpath))
|
||||||
count += 1
|
count += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user