Comment 7 for bug 1920836

Revision history for this message
Chad Smith (chad.smith) wrote :

Thanks @robert-ancell for setting up the PPA.

I tested on Xenial Ubuntu Desktop LiveCD and would like to report Failure on this implementation.

Your use of subprocess is passing capture_output on xenial and that is raising an error in python before calling ua client.

On a system attached to esm-apps:

python3 -c 'import gi; gi.require_version("Gtk", "3.0"); from softwareproperties.gtk.utils import get_esm_apps_status; print(get_esm_apps_status())'
Failed to call ubuntu advantage client:
__init__() got an unexpected keyword argument 'capture_output'
(False, False)

Note that run(capture_output) param is not available on python3.5 (it was introduced only in 3.7).

Also just dropping that capture_output param you've got some other logic relying on result.stdout which is None in this case.

while you iterate on this work, you could substitute esm-infra in your get_esm_apps_status function as it'll behave the same way as app, and all contracts are entitled to esm-infra at the moment so it will be easier to test enabled, available etc.

If you'd like review on the iterations of these SRU branches related to this just assign lamoura or chad.smith too and we can take a look.