diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-09 21:11:12 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-09 21:11:12 +0800 |
commit | aef666a6e1e1b2501f9779914627062a146dd21e (patch) | |
tree | 53a2c79d4cf2e41adbddb03bcddfba0fbf05c715 /fg21sim/webui/consolehandler.py | |
parent | 31e328d5ea6aff36e43ad54029589c7f15be82b7 (diff) | |
download | fg21sim-aef666a6e1e1b2501f9779914627062a146dd21e.tar.bz2 |
webui: consolehandler.py: Fix a minor bug
Diffstat (limited to 'fg21sim/webui/consolehandler.py')
-rw-r--r-- | fg21sim/webui/consolehandler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fg21sim/webui/consolehandler.py b/fg21sim/webui/consolehandler.py index 0184a93..5c7da00 100644 --- a/fg21sim/webui/consolehandler.py +++ b/fg21sim/webui/consolehandler.py @@ -78,11 +78,11 @@ class ConsoleHandler: logger.info("WebSocket: handle message: " + "type: {0}, action: {1}".format(msg_type, msg_action)) if msg_action == "start": - # Start the task asynchronously - future = self._start(msg["time"]) - self.io_loop.add_future(future, self._response_future) - response["success"] = True - response["status"] = "future" + # FIXME/XXX: This task should be asynchronous! + success, error = self._start(msg["time"]) + response["success"] = success + if not success: + response["error"] = error elif msg_action == "get_status": response["success"] = True response["action"] = "push" |