Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions usr/lib/linuxmint/mintUpdate/checkAPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
with open("/usr/lib/linuxmint/mintUpdate/aliases") as alias_file:
for line in alias_file:
if not line.startswith('#'):
splitted = line.split("#####")

Check failure on line 39 in usr/lib/linuxmint/mintUpdate/checkAPT.py

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22.3-amd64, Mint 22, true) / Mint 22

splitted ==> split
if len(splitted) == 4:

Check failure on line 40 in usr/lib/linuxmint/mintUpdate/checkAPT.py

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22.3-amd64, Mint 22, true) / Mint 22

splitted ==> split
(alias_packages, alias_name, alias_short_description, alias_description) = splitted

Check failure on line 41 in usr/lib/linuxmint/mintUpdate/checkAPT.py

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22.3-amd64, Mint 22, true) / Mint 22

splitted ==> split
alias_object = Alias(alias_name, alias_short_description, alias_description)
for alias_package in alias_packages.split(','):
alias_package = alias_package.strip()
Expand All @@ -52,6 +52,12 @@

# Package updates
for pkg in changes:
if pkg.candidate is None:
# Installed package has no candidate version (e.g. orphaned
# or removed from the repositories). Skip it so the rest of
# the update list can still be refreshed.
print("Skipping package without candidate version: %s" % pkg.name)
continue
if (pkg.is_installed and pkg.candidate.version != pkg.installed.version):
if (pkg.marked_upgrade or pkg.marked_downgrade):
self.add_update(pkg)
Expand Down
Loading