From 3f6113d2bb0aca29a91282f8103b47d8ac310340 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sun, 23 Oct 2016 18:33:08 +0200 Subject: libarcfire: DIF::members: switch to dict --- libarcfire.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libarcfire.py b/libarcfire.py index 0402b30..e9b7adc 100755 --- a/libarcfire.py +++ b/libarcfire.py @@ -10,16 +10,19 @@ class DIF: def __init__(self, name, members): self.name = name - self.members = set() if members == None else set(members) + self.members = dict() + if members != None: + for m in members: + self.members[m] = m def __repr__(self): return "%s: %s" % (self.name, str(sorted(self.members))) def node_add(node_name): - self.members.add(node_name) + self.members[node_name] = node_name def node_del(node_name): - self.members.discard(node_name) + del self.members[node_name] # Shim over Ethernet -- cgit v1.2.3