From aef666a6e1e1b2501f9779914627062a146dd21e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 9 Nov 2016 21:11:12 +0800 Subject: webui: consolehandler.py: Fix a minor bug --- fg21sim/webui/consolehandler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fg21sim/webui/consolehandler.py') 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" -- cgit v1.2.2