moved common variables up and localname to CoreInterface, they were being created in all subclasses and avoids type hinting errors

This commit is contained in:
Blake Harnden 2020-05-23 01:05:46 -07:00
parent 37ff989aa4
commit c580e15f8e
6 changed files with 14 additions and 25 deletions

View file

@ -280,12 +280,10 @@ class Rj45Node(CoreNodeBase, CoreInterface):
will run on, default is None for localhost
"""
CoreNodeBase.__init__(self, session, _id, name, start, server)
CoreInterface.__init__(self, session, self, name, mtu, server)
CoreInterface.__init__(self, session, self, name, name, mtu, server)
self.lock = threading.RLock()
self.ifindex = None
# the following are PyCoreNetIf attributes
self.transport_type = "raw"
self.localname = name
self.old_up = False
self.old_addrs = []
if start: