Skip to content

Commit 8d39107

Browse files
committed
make type checker happy
1 parent 6b01361 commit 8d39107

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cosmo/l2vpnhelpertypes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ def remoteInterfaceValidationTemplateMethod(self, remote: InterfaceType):
190190

191191
def processInterfaceTypeTermination(self, o: InterfaceType):
192192
parent_l2vpn = o.getParent(L2VPNType)
193-
local = next(filter(
193+
local = head(list(filter(
194194
lambda i: (
195195
isinstance(i, InterfaceType)
196196
and i == o
197197
),
198198
parent_l2vpn.getTerminations()
199-
))
200-
remote = next(filter(
199+
)))
200+
remote = head(list(filter(
201201
lambda i: i != local,
202202
parent_l2vpn.getTerminations()
203-
))
203+
)))
204204
if not isinstance(remote, InterfaceType):
205205
raise L2VPNSerializationError(
206206
f"Incorrect termination type {type(remote)} for L2VPN {parent_l2vpn.getName()}."

0 commit comments

Comments
 (0)