diff --git a/sos/policies/package_managers/flatpak.py b/sos/policies/package_managers/flatpak.py index 7e171aa5df..ccbd7ff8a3 100644 --- a/sos/policies/package_managers/flatpak.py +++ b/sos/policies/package_managers/flatpak.py @@ -15,16 +15,20 @@ class FlatpakPackageManager(PackageManager): """Package Manager for Flatpak distributions """ - query_command = 'flatpak list --columns=name,version' + query_command = 'flatpak list --columns=name,version,branch' query_path_command = '' files_command = '' verify_command = '' verify_filter = '' def _parse_pkg_list(self, pkg_list): - for line in pkg_list.splitlines(): - pkg = line.split() - name, version = pkg[0], pkg[1] - yield (name, version, None) + for line in pkg_list.splitlines()[1:]: + pkg = line.split("\t") + name, branch = pkg[0], pkg[2] + if not pkg[1]: + version = '' + else: + version = pkg[1] + yield (name, version, branch) # vim: set et ts=4 sw=4 :