Skip to content

Commit

Permalink
please python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Jul 5, 2023
1 parent ce3d429 commit b03c6ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pymodbus/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__( # pylint: disable=too-many-arguments
setup_params = CommParams(
comm_type=kwargs.get("CommType"),
comm_name="comm",
source_address=kwargs.get("source_address", ("localhost", 0)),
source_address=kwargs.get("source_address", ("127.0.0.1", 0)),
reconnect_delay=reconnect_delay,
reconnect_delay_max=reconnect_delay_max,
timeout_connect=timeout,
Expand Down
6 changes: 3 additions & 3 deletions pymodbus/transport/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class CommParams:
reconnect_delay: float = None
reconnect_delay_max: float = None
timeout_connect: float = None
host: str = "localhost"
host: str = "127.0.0.1"
port: int = 0
source_address: tuple[str, int] = ("localhost", 0)
source_address: tuple[str, int] = ("127.0.0.1", 0)

# tls
sslctx: ssl.SSLContext = None
Expand Down Expand Up @@ -93,7 +93,7 @@ class ModbusProtocol(asyncio.BaseProtocol):
Host/Port/SourceAddress explanation:
- SourceAddress:
- server: (host, port) to listen on (default is ("localhost", 502/802))
- server: (host, port) to listen on (default is ("127.0.0.1", 502/802))
- server serial: (host, _) to open/connect and listen on
- client: (Bind local part to interface (default is local interface)
- client serial: (host, _) to open/connect and listen on
Expand Down

0 comments on commit b03c6ea

Please sign in to comment.