Skip to content

Commit d6dce90

Browse files
authored
Don't catch KeyboardInterrupt twice for REPL server (#1498)
1 parent 9f66ab5 commit d6dce90

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pymodbus/repl/server/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,12 @@ def run(
198198
**web_app_config,
199199
**modbus_config,
200200
)
201-
try:
201+
if repl:
202+
loop.run_until_complete(run_repl(app))
203+
else:
202204
loop.run_until_complete(app.run_async(repl))
203-
if repl:
204-
loop.run_until_complete(run_repl(app))
205205
loop.run_forever()
206206

207-
except CANCELLED_ERROR:
208-
print("Done!!!!!")
209-
210207

211208
if __name__ == "__main__":
212209
app()

0 commit comments

Comments
 (0)