From 3892df3bf35ca84efafe47f5263b4d8d1e4c968d Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Thu, 11 Jul 2024 19:28:31 -0400 Subject: [PATCH] Always initialize appstream_version, remove hacky description 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. --- usr/lib/linuxmint/mintUpdate/Classes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintUpdate/Classes.py b/usr/lib/linuxmint/mintUpdate/Classes.py index 1fece6a0..e6780674 100644 --- a/usr/lib/linuxmint/mintUpdate/Classes.py +++ b/usr/lib/linuxmint/mintUpdate/Classes.py @@ -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) @@ -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 = ""