mirror of https://github.com/ansible/ansible.git
Catch the raised exception so we can report failure (#42072)
Avoid the _undefined name_ and mirror lines 389 and 459 by catching the raised exception in the variable __exc__ so it can be reported on the following line. flake8 testing of https://github.com/ansible/ansible on Python 3.6.3 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./lib/ansible/module_utils/network/iosxr/iosxr.py:414:42: F821 undefined name 'exc' module.fail_json(msg=to_text(exc)) ^ ```pull/42354/head
parent
52e7946de5
commit
61d5454737
Loading…
Reference in New Issue