Call global logger when catching pip.list exceptions in states.pip.installed

This commit is contained in:
Eric Graham 2023-04-26 14:26:55 -05:00 committed by Megan Wilhite
parent 57608c0067
commit aeaf55815a
2 changed files with 2 additions and 1 deletions

1
changelog/64169.fixed.md Normal file
View file

@ -0,0 +1 @@
Call global logger when catching pip.list exceptions in states.pip.installed

View file

@ -852,7 +852,7 @@ def installed(
)
# If we fail, then just send False, and we'll try again in the next function call
except Exception as exc: # pylint: disable=broad-except
log.exception(exc)
globals().get("log").exception(exc)
pip_list = False
for prefix, state_pkg_name, version_spec in pkgs_details: