Skip to content

Commit

Permalink
Fix problem with accidental double-equals
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 11, 2023
1 parent 2b655e2 commit 249523c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ciscoconfparse/ccp_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,9 @@ def __init__(self, arg=f"0.0.0.1/{IPV4_MAX_PREFIXLEN}", strict=False, debug=0):

tmp = re.split(r"\s+", arg.strip())
if len(tmp)==2:
arg=="/".join(tmp)
arg="/".join(tmp)
elif len(tmp)==1:
arg==tmp[0]
arg=tmp[0]
else:
# anything else should be handled by the following regex...
pass
Expand Down Expand Up @@ -966,9 +966,7 @@ def __init__(self, arg=f"0.0.0.1/{IPV4_MAX_PREFIXLEN}", strict=False, debug=0):

else:
raise AddressValueError(
"Could not parse '{}' (type: {}) into an IPv4 Address".format(
arg, type(arg)
)
f"Could not parse '{arg}' ({type(arg)}) into an IPv4 Address"
)


Expand Down

0 comments on commit 249523c

Please sign in to comment.