Skip to content

Commit

Permalink
Check actual event type and not PmType
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Aug 7, 2024
1 parent a9a85fb commit 1727ce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zino/statemodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class PortStateMaintenance(PlannedMaintenance):

def matches_event(self, event: Event, state: "ZinoState") -> bool:
"""Returns true if `event` will be affected by this planned maintenance"""
if event.type != PmType.PORTSTATE:
if not isinstance(event, PortStateEvent):
return False
device = state.devices[event.router]
port = device.ports[event.ifindex]
Expand Down

0 comments on commit 1727ce5

Please sign in to comment.