Skip to content

Commit

Permalink
fixes pylint used-before-assignment error (#504)
Browse files Browse the repository at this point in the history
* fixes pylint used-before-assignment error

* add changelog

* chore: auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Ruchip16 and pre-commit-ci[bot] authored Aug 8, 2024
1 parent c6e94aa commit dfad233
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/pylint_fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- Fixes pylint used-before-assignment error.
2 changes: 1 addition & 1 deletion plugins/module_utils/network/iosxr/config/acls/acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def _compute_src_dest(dir_dict):

return cmd

def _compute_protocol_options(protocol_dict):
def _compute_protocol_options(protocol_options):
cmd = ""
for value in protocol_options.values():
for subkey, subvalue in iteritems(value):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def _tmplt_confederation_peers(config_data):

def _templ_local_as(config_data):
conf = config_data.get("local_as", {})
command = ""
if conf.get("value"):
command = "local-as " + str(conf.get("value", {}))
if "no_prepend" in conf:
Expand Down

0 comments on commit dfad233

Please sign in to comment.