From d6bbc263ad455207d6d4c081c95309d45094187b Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sat, 10 Jan 2015 16:37:52 +0000 Subject: [PATCH] Allow multiple instantiations of GenericNetlink --- nl80211.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nl80211.py b/nl80211.py index a6b1442..c1ffbea 100755 --- a/nl80211.py +++ b/nl80211.py @@ -252,19 +252,19 @@ class GenericNetlink(object): 7: ('mcast_groups', Array(_mcast_grp_attr)), }) - _msgtypes = [ - { - 'id': 0x10, - 'name': 'nlctrl', - 'parser': _ctrl_attr, - 'commands': { - 'newfamily': 1, - 'getfamily': 3, - }, - }, - ] - def __init__(self): + self._msgtypes = [ + { + 'id': 0x10, + 'name': 'nlctrl', + 'parser': self._ctrl_attr, + 'commands': { + 'newfamily': 1, + 'getfamily': 3, + }, + }, + ] + self._netlink = Netlink() self._UpdateMsgTypes() self.Send('nlctrl', ['dump'], 'getfamily', 1)