Skip to content

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 27, 2024
1 parent f179c72 commit 1a6cfc9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugins/module_utils/network/nxos/config/acls/acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,26 @@ def convert_values(self, want):
val = ace[x]["port_protocol"][key]
if val.isdigit():
if int(val) in port_protocol.keys():
ace[x]["port_protocol"][key] = port_protocol[int(val)]
ace[x]["port_protocol"][key] = port_protocol[
int(val)
]
else:
ace[x]["port_protocol"][key] = val
else:
st = ace[x]["port_protocol"]["range"]["start"]
end = ace[x]["port_protocol"]["range"]["end"]
if st.isdigit():
if int(st) in port_protocol.keys():
ace[x]["port_protocol"]["range"]["start"] = port_protocol[int(st)]
ace[x]["port_protocol"]["range"]["start"] = (
port_protocol[int(st)]
)
else:
ace[x]["port_protocol"]["range"]["start"] = st
if end.isdigit():
if int(end) in port_protocol.keys():
ace[x]["port_protocol"]["range"]["end"] = port_protocol[int(end)]
ace[x]["port_protocol"]["range"]["end"] = (
port_protocol[int(end)]
)
else:
ace[x]["port_protocol"]["range"]["end"] = end
return want
Expand Down

0 comments on commit 1a6cfc9

Please sign in to comment.