Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1197078 - Send result of emulator command in JSON format. f=ato r…
Browse files Browse the repository at this point in the history
…=dburns
  • Loading branch information
EdgarChen committed Aug 21, 2015
1 parent 03d0320 commit 956f5a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/marionette/driver/marionette_driver/marionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def _emulator_cmd(self, id, cmd):
return self._send_emulator_result(id, result)

def _emulator_shell(self, id, args):
if not self.emulator:
if not isinstance(args, list) or not self.emulator:
raise errors.MarionetteException(
"No emulator in this test to run shell command against")
buf = StringIO.StringIO()
Expand All @@ -733,9 +733,9 @@ def _emulator_shell(self, id, args):
return self._send_emulator_result(id, result)

def _send_emulator_result(self, id, result):
return self.client.send({"name": "emulatorCmdResult",
"id": id,
"result": result})
return self.client.send(json.dumps({"name": "emulatorCmdResult",
"id": id,
"result": result}))

def _handle_error(self, resp):
if self.protocol == 1:
Expand Down

0 comments on commit 956f5a6

Please sign in to comment.