updated interface.py to use python3 super()

This commit is contained in:
bharnden 2019-10-23 10:40:40 -07:00
parent b185c3c679
commit 440c8ed565
4 changed files with 7 additions and 7 deletions

View file

@ -302,7 +302,7 @@ class BasicRangeModel(WirelessModel):
:param core.session.Session session: related core session
:param int _id: object id
"""
super().__init__(session=session, _id=_id)
super().__init__(session, _id)
self.session = session
self.wlan = session.get_node(_id)
self._netifs = {}

View file

@ -232,7 +232,7 @@ class Veth(CoreInterface):
:raises CoreCommandError: when there is a command exception
"""
# note that net arg is ignored
CoreInterface.__init__(self, session, node, name, mtu, server)
super().__init__(session, node, name, mtu, server)
self.localname = localname
self.up = False
if start:
@ -293,7 +293,7 @@ class TunTap(CoreInterface):
will run on, default is None for localhost
:param bool start: start flag
"""
CoreInterface.__init__(self, session, node, name, mtu, server)
super().__init__(session, node, name, mtu, server)
self.localname = localname
self.up = False
self.transport_type = "virtual"
@ -476,7 +476,7 @@ class GreTap(CoreInterface):
will run on, default is None for localhost
:raises CoreCommandError: when there is a command exception
"""
CoreInterface.__init__(self, session, node, name, mtu, server)
super().__init__(session, node, name, mtu, server)
if _id is None:
# from PyCoreObj
_id = ((id(self) >> 16) ^ (id(self) & 0xFFFF)) & 0xFFFF

View file

@ -401,7 +401,7 @@ class Ipv4Prefix(IpPrefix):
:param str prefixstr: ip prefix
"""
IpPrefix.__init__(self, AF_INET, prefixstr)
super().__init__(AF_INET, prefixstr)
class Ipv6Prefix(IpPrefix):
@ -415,7 +415,7 @@ class Ipv6Prefix(IpPrefix):
:param str prefixstr: ip prefix
"""
IpPrefix.__init__(self, AF_INET6, prefixstr)
super().__init__(AF_INET6, prefixstr)
def is_ip_address(af, addrstr):

View file

@ -19,7 +19,7 @@ class PhysicalNode(CoreNodeBase):
def __init__(
self, session, _id=None, name=None, nodedir=None, start=True, server=None
):
CoreNodeBase.__init__(self, session, _id, name, start, server)
super().__init__(session, _id, name, start, server)
if not self.server:
raise CoreError("physical nodes must be assigned to a remote server")
self.nodedir = nodedir