Skip to content

Commit 0539c2d

Browse files
committed
Guard against flatpak support in some recent changes.
Fixes #423.
1 parent 9a292ee commit 0539c2d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

usr/lib/linuxmint/mintinstall/mintinstall.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ def load_banner(self):
14531453
name = name.replace("flatpak:", "")
14541454
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_FLATPAK)
14551455

1456-
if not pkginfo.verified:
1456+
if pkginfo is None or not pkginfo.verified:
14571457
continue
14581458

14591459
is_flatpak = True
@@ -1634,7 +1634,7 @@ def load_featured(self):
16341634
if name.startswith("flatpak:"):
16351635
name = name.replace("flatpak:", "")
16361636
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_FLATPAK)
1637-
if not pkginfo.verified:
1637+
if pkginfo is None or not pkginfo.verified:
16381638
continue
16391639
else:
16401640
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_APT)
@@ -2387,8 +2387,11 @@ def finished_loading_packages(self):
23872387
return False
23882388

23892389
def get_installed_package_hashes(self):
2390-
installed_fp_refs = installer._flatpak.get_fp_sys().list_installed_refs(None)
2391-
fp_hashes = [installer._flatpak.make_pkg_hash(ref) for ref in installed_fp_refs]
2390+
if self.installer.have_flatpak:
2391+
installed_fp_refs = installer._flatpak.get_fp_sys().list_installed_refs(None)
2392+
fp_hashes = [installer._flatpak.make_pkg_hash(ref) for ref in installed_fp_refs]
2393+
else:
2394+
fp_hashes = []
23922395

23932396
apt_cache = installer._apt.get_apt_cache()
23942397
apt_hashes = [installer._apt.make_pkg_hash(pkg) for pkg in apt_cache if pkg.installed]

0 commit comments

Comments
 (0)