aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <[email protected]>2016-10-23 18:33:08 +0200
committerVincenzo Maffione <[email protected]>2016-10-23 18:33:08 +0200
commit3f6113d2bb0aca29a91282f8103b47d8ac310340 (patch)
tree027e31474fbd0743632ebcfaabd6c60a1d8c1673
parentcf63ba6fc8317f43dd5c8a7920296b4ba76d8c97 (diff)
downloadrumba-3f6113d2bb0aca29a91282f8103b47d8ac310340.tar.gz
rumba-3f6113d2bb0aca29a91282f8103b47d8ac310340.zip
libarcfire: DIF::members: switch to dict
-rwxr-xr-xlibarcfire.py9
1 files 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