Skip to content

Commit

Permalink
Always initialize appstream_version, remove hacky description
Browse files Browse the repository at this point in the history
reformatting.

With the fix in linuxmint/mintcommon@5bc8447d6, there won't be
any more unwanted runtime PkgInfos, so appstream_version isn't
guaranteed to be set.
  • Loading branch information
mtwebster committed Jul 11, 2024
1 parent be0f9b1 commit 3892df3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/lib/linuxmint/mintUpdate/Classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def __init__(self, op=None, installer=None, ref=None, installed_ref=None, remote
iref_version = ""
old_commit = ""

appstream_version = ""
# new version
if pkginfo:
appstream_version = installer.get_version(pkginfo)
Expand All @@ -457,8 +458,7 @@ def __init__(self, op=None, installer=None, ref=None, installed_ref=None, remote

if pkginfo:
self.summary = installer.get_summary(pkginfo)
description = installer.get_description(pkginfo)
self.description = re.sub(r'\n+', '\n\n', description).rstrip()
self.description = installer.get_description(pkginfo)
elif installed_ref:
self.summary = installed_ref.get_appdata_summary()
self.description = ""
Expand Down

1 comment on commit 3892df3

@carlosmintfan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to the mintcommon commit doesn't work..

Please sign in to comment.