修改删除软件包名单python移除算法问题

This commit is contained in:
wangsong 2022-10-14 09:08:10 +08:00
parent 5da8114c27
commit 13430cf99a
1 changed files with 4 additions and 2 deletions

View File

@ -106,8 +106,10 @@ class UpdateEssentialItem():
def check_white(self,remove_pkgs):
logging.info("Check: remove pkg in White Packages...")
for pkg in remove_pkgs:
if pkg in self.remove_white:
new_upgrade_list = list(set(remove_pkgs) & set(self.remove_white))
for pkg in new_upgrade_list:
if pkg in remove_pkgs:
logging.info("%s will be remove in remove pkg...",pkg)
remove_pkgs.remove(pkg)