Skip to content

Commit

Permalink
Fix potential UnboundLocalError on docs (#513)
Browse files Browse the repository at this point in the history
* Fix potential NameError on docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Qalthos and pre-commit-ci[bot] authored Mar 1, 2023
1 parent f48088b commit 4bd105c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/fragments/ule-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- network_resource - fix a potential UnboundLocalError if the module fails to import a
Resource Module. (https://github.com/ansible-collections/ansible.netcommon/pull/513)
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ readme: README.md
repository: https://github.com/ansible-collections/ansible.netcommon
issues: https://github.com/ansible-collections/ansible.netcommon/issues
tags: [networking, security, cloud, network_cli, netconf, httpapi, grpc]
version: 5.0.0
version: 5.0.1-dev
1 change: 1 addition & 0 deletions plugins/action/network_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def _list_resource_modules(self):

for module_path in module_paths:
module_name = os.path.basename(module_path).split(".")[0]
docs = None
try:
display.vvvv(
"reading 'DOCUMENTATION' from path %s" % (module_path)
Expand Down

0 comments on commit 4bd105c

Please sign in to comment.