diff options
author | Vincenzo Maffione <v.maffione@gmail.com> | 2016-10-23 18:33:08 +0200 |
---|---|---|
committer | Vincenzo Maffione <v.maffione@gmail.com> | 2016-10-23 18:33:08 +0200 |
commit | 3f6113d2bb0aca29a91282f8103b47d8ac310340 (patch) | |
tree | 027e31474fbd0743632ebcfaabd6c60a1d8c1673 | |
parent | cf63ba6fc8317f43dd5c8a7920296b4ba76d8c97 (diff) | |
download | rumba-3f6113d2bb0aca29a91282f8103b47d8ac310340.tar.gz rumba-3f6113d2bb0aca29a91282f8103b47d8ac310340.zip |
libarcfire: DIF::members: switch to dict
-rwxr-xr-x | libarcfire.py | 9 |
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 |