Skip to content

Commit

Permalink
Modify conflicting pkg add
Browse files Browse the repository at this point in the history
  • Loading branch information
thw26 committed Aug 23, 2024
1 parent 125d783 commit 8fc670d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,22 @@ def query_packages(packages, mode="install", app=None):
if mode == 'install':
status[p] = "Installed"
elif mode == 'remove':
conflicting_packages.append(p)
status[p] = 'Conflicting'
break
else:
if line.strip().startswith(f"{config.QUERY_PREFIX}{p}") and mode == "install": # noqa: E501
status[p] = "Installed"
break
elif line.strip().startswith(p) and mode == "remove":
conflicting_packages.append(p)
status[p] = "Conflicting"
break
break

if status[p] == "Unchecked":
if mode == "install":
missing_packages.append(p)
status[p] = "Missing"
elif mode == "remove":
conflicting_packages.append(p)
status[p] = "Not Installed"

if mode == "install":
Expand Down

0 comments on commit 8fc670d

Please sign in to comment.