Skip to content

Commit

Permalink
fix if/else style
Browse files Browse the repository at this point in the history
  • Loading branch information
leossok committed Jun 16, 2022
1 parent d1ff911 commit ddc2fcd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rosbridge_server/scripts/rosbridge_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,11 @@ def __init__(self):
# Done with parameter handling #
##################################################

handlers = [(r"/", RosbridgeWebSocket), (r"", RosbridgeWebSocket)]
if url_path != "/":
application = Application([(rf"{url_path}", RosbridgeWebSocket)], **tornado_settings)
else:
application = Application(
[(r"/", RosbridgeWebSocket), (r"", RosbridgeWebSocket)], **tornado_settings
)
handlers = [(rf"{url_path}", RosbridgeWebSocket)]

application = Application(handlers, **tornado_settings)

connected = False
while not connected and self.context.ok():
Expand Down

0 comments on commit ddc2fcd

Please sign in to comment.