Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions pymodbus/server/simulator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
from pymodbus.server.simulator.http_server import ModbusSimulatorServer


async def run():
"""Run simulator."""


def get_commandline():
"""Get command line arguments."""
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -110,13 +106,12 @@ def get_commandline():
return cmd_args


async def main():
def main():
"""Run server."""
cmd_args = get_commandline()
task = ModbusSimulatorServer(**cmd_args)

await task.run_forever()
asyncio.run(task.run_forever(), debug=True)


if __name__ == "__main__":
asyncio.run(main(), debug=True)
main()