Allow string mac address in constructor
This commit is contained in:
parent
1d6d8d2aee
commit
77f11c8d49
1 changed files with 12 additions and 12 deletions
|
|
@ -143,7 +143,7 @@ def discover(timeout=None, local_ip_address=None):
|
||||||
class device:
|
class device:
|
||||||
def __init__(self, host, mac, devtype, timeout=10):
|
def __init__(self, host, mac, devtype, timeout=10):
|
||||||
self.host = host
|
self.host = host
|
||||||
self.mac = mac
|
self.mac = mac.encode() if isinstance(mac, str) else mac
|
||||||
self.devtype = devtype
|
self.devtype = devtype
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.count = random.randrange(0xffff)
|
self.count = random.randrange(0xffff)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue