Skip to content

Commit f815003

Browse files
authored
pymodbus.simulator fixes (#1463)
1 parent c77e858 commit f815003

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymodbus/server/simulator/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"""
4242
import argparse
4343
import asyncio
44+
import os
4445

4546
from pymodbus import pymodbus_apply_logging_config
4647
from pymodbus.logging import Log
@@ -66,12 +67,12 @@ def get_commandline():
6667
"--http_host",
6768
help="use <http_host> as host to bind http listen",
6869
type=str,
69-
default=8081,
7070
)
7171
parser.add_argument(
7272
"--http_port",
7373
help="use <http_port> as port to bind http listen",
7474
type=str,
75+
default=8081,
7576
)
7677
parser.add_argument(
7778
"--log",
@@ -84,7 +85,7 @@ def get_commandline():
8485
"--json_file",
8586
help='name of json file, default is "setup.json"',
8687
type=str,
87-
default="./pymodbus/server/simulator/setup.json",
88+
default=os.path.join(os.path.dirname(__file__), "setup.json"),
8889
)
8990
parser.add_argument(
9091
"--log_file",

0 commit comments

Comments
 (0)