Skip to content

Commit

Permalink
fixes issue with vlan filter #373
Browse files Browse the repository at this point in the history
  • Loading branch information
bb-Ricardo committed Nov 28, 2024
1 parent 1a0c742 commit 740f1e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/sources/common/handle_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, vlan, filter_type):

if vlan is None or len(f"{vlan}") == 0:
self._validation_failed = True
log.error(f"submitted VLAN {self.filter_type} string for VLAN was '{"'None'" if vlan is None else "empty" }'")
log.error(f"submitted VLAN {self.filter_type} string for VLAN was " + "'None'" if vlan is None else "empty")
return

vlan_split = [x.replace('\\', "") for x in re.split(r'(?<!\\)/', vlan)]
Expand Down Expand Up @@ -64,7 +64,7 @@ class FilterVLANByName(VLANFilter):
initializes and verifies if a VLAN matches by name
"""

def __init__(self, vlan, filter_type):
def __init__(self, vlan, filter_type="exclude"):

super().__init__(vlan, filter_type)

Expand Down Expand Up @@ -97,7 +97,7 @@ class FilterVLANByID(VLANFilter):
initializes and verifies if a VLAN matches by ID
"""

def __init__(self, vlan, filter_type):
def __init__(self, vlan, filter_type="exclude"):

super().__init__(vlan, filter_type)

Expand Down

0 comments on commit 740f1e1

Please sign in to comment.