From a4ec4bfd0a37fe0e6b8b96859c16c7bee003aaaa Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Wed, 19 Feb 2014 21:25:32 -0800 Subject: [PATCH] add wait option to POST /commands --- teeth_agent/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teeth_agent/api.py b/teeth_agent/api.py index 97380bdfd..49a74aaef 100644 --- a/teeth_agent/api.py +++ b/teeth_agent/api.py @@ -73,6 +73,11 @@ class TeethAgentAPI(component.APIComponent): """Execute a command on the agent.""" command = AgentCommand.deserialize(self.parse_content(request)) result = self.agent.execute_command(command.name, **command.params) + + wait = request.args.get('wait') + if wait and wait.lower() == 'true': + result.join() + return responses.ItemResponse(result) def get_command_result(self, request, result_id):