Skip to content

Commit

Permalink
pkginfo: Initialize cached strings to None
Browse files Browse the repository at this point in the history
In the getter functions, cached strings are evaluated against
None, not an empty string, to determine return values.

This prevents flatpaks without appdata from having a blank name
in mintupdate's updates list (Example: org.flatpak.Builder).
  • Loading branch information
mtwebster committed Jun 18, 2024
1 parent 089d9e7 commit a3870f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/lib/python3/dist-packages/mintcommon/installer/pkgInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def __init__(self, pkg_hash=None):
self.commit = ""
self.remote_url = ""
# We need these at minimum for a nice startup state before appstream is loaded.
self.cached_display_name = ""
self.cached_summary = ""
self.cached_icon = ""
self.cached_display_name = None
self.cached_summary = None
self.cached_icon = None

# Display info fetched by methods always
self.display_name = None
Expand Down

0 comments on commit a3870f6

Please sign in to comment.