Public bug reported:

The documentation[1] says that current_news and updates() raise no
exceptions, but:

--->
% UA_CONFIG_FILE=/ python3 -c "from uaclient.api.u.pro.packages.updates.v1 
import updates; updates()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File 
"/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/updates/v1.py", 
line 84, in updates
    return _updates(UAConfig())
                    ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 110, in 
__init__
    self.cfg, self.invalid_keys = parse_config(self.cfg_path)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 627, in 
parse_config
    cfg.update(safe_load(system.load_file(config_path)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/uaclient/system.py", line 516, in 
load_file
    with open(filename, "rb") as stream:
         ^^^^^^^^^^^^^^^^^^^^
<---

[1] https://canonical-ubuntu-pro-client.readthedocs-
hosted.com/en/latest/references/api/

** Affects: ubuntu-advantage-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2066920

Title:
  Exceptions raised if UA_CONFIG_FILE is bad

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2066920/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to