feat(connector.py): get mac address from init argument
This commit is contained in:
@@ -12,6 +12,7 @@ from judas_protocol import Message
|
|||||||
class Connector:
|
class Connector:
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
mac_address: str,
|
||||||
host: str,
|
host: str,
|
||||||
port: int,
|
port: int,
|
||||||
connect_timeout: float = 5.0,
|
connect_timeout: float = 5.0,
|
||||||
@@ -32,7 +33,7 @@ class Connector:
|
|||||||
socket.AF_INET, socket.SOCK_STREAM
|
socket.AF_INET, socket.SOCK_STREAM
|
||||||
)
|
)
|
||||||
|
|
||||||
self.mac_address: str = self._get_mac_address()
|
self.mac_address: str = mac_address
|
||||||
|
|
||||||
def _get_mac_address(self) -> str:
|
def _get_mac_address(self) -> str:
|
||||||
mac_address: str = ":".join(
|
mac_address: str = ":".join(
|
||||||
|
|||||||
Reference in New Issue
Block a user