subprocess.run is nicer that subprocess.Popen since you do not have to close the opened process. The underlying problem is that subprocess.Popen gave you the output line by line, but stdout from subprocess.run is the complete output. To iterate over the lines you have to call splitlines() first. Otherwise only the first line is taken into account and all following lines will be ignored.
I added a test case and fixed the code (besides some packaging clean- up). Thanks H. Hösch for the analysis and for finding the culprit. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to software-properties in Ubuntu. https://bugs.launchpad.net/bugs/1970449 Title: GPG keys are not shown in Software and Updates Status in software-properties package in Ubuntu: Confirmed Status in software-properties source package in Jammy: Confirmed Status in software-properties source package in Kinetic: Confirmed Bug description: software-properties-gtk does not show the registered apt gpg keys in the "Authentication" tab on my Ubuntu 21.10 and 22.04 systems. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: ubuntu-release-upgrader-core 1:22.04.10 ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30 Uname: Linux 5.15.0-27-generic x86_64 ApportVersion: 2.20.11-0ubuntu82 Architecture: amd64 CasperMD5CheckResult: pass CrashDB: ubuntu CurrentDesktop: ubuntu:GNOME Date: Tue Apr 26 20:48:04 2022 InstallationDate: Installed on 2022-04-25 (0 days ago) InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419) PackageArchitecture: all SourcePackage: ubuntu-release-upgrader Symptom: ubuntu-release-upgrader UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1970449/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp