python: fixup VLANLink() initialization
The varialble name should be link._rtnl_link instead of link._link to get rid of the AttributeError. Traceback (most recent call last): File "examples/test.py", line 11, in <module> eth0 = link.resolve('eth0.800') ... File "/home/ubuntu/libnl/python/build/lib.linux-x86_64-2.7/netlink/route/link.py", line 151, in __init__ self._module_lookup('netlink.route.links.' + self.type) ... File "/home/ubuntu/libnl/python/build/lib.linux-x86_64-2.7/netlink/route/links/vlan.py", line 70, in init link.vlan = VLANLink(link._link) AttributeError: 'Link' object has no attribute '_link' Signed-off-by: Nicolas PLANEL <nicolas.planel@enovance.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
ae7f8cc988
commit
f2e6f502eb
1 changed files with 1 additions and 1 deletions
|
@ -67,5 +67,5 @@ class VLANLink(object):
|
|||
return 'vlan-id {0}'.format(self.id)
|
||||
|
||||
def init(link):
|
||||
link.vlan = VLANLink(link._link)
|
||||
link.vlan = VLANLink(link._rtnl_link)
|
||||
return link.vlan
|
||||
|
|
Loading…
Add table
Reference in a new issue