Skip to content

Commit

Permalink
Escape "{}" in .format string
Browse files Browse the repository at this point in the history
  • Loading branch information
ubaumann authored Oct 18, 2023
1 parent f47570f commit 0b7b84e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion napalm/nxos_ssh/nxos_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def bgp_normalize_table_data(bgp_table):
Normalize this so the line wrap doesn't exit.
"""
bgp_table = bgp_table.strip()
bgp_multiline_pattern = r"({})(\s*\d*){0,3}\s*\n".format(IPV4_OR_IPV6_REGEX)
bgp_multiline_pattern = r"({})(\s*\d*){{0,3}}\s*\n".format(IPV4_OR_IPV6_REGEX)
# Strip out the newline
return re.sub(bgp_multiline_pattern, r"\1", bgp_table)

Expand Down

0 comments on commit 0b7b84e

Please sign in to comment.