Skip to content

Commit

Permalink
No need to quote the result in the JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Jan 8, 2014
1 parent 1903b68 commit 70f5e6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vpoller/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_host_property(self, msg):
else:
return "{ \"success\": -1, \"msg\": \"Unable to find ESXi host %s\" }" % msg["name"]

result = "{ \"status\": 0, \"msg\": \"Successfully retrieved property\", \"result\": \"%s\" }" % json.dumps(d)
result = "{ \"status\": 0, \"msg\": \"Successfully retrieved property\", \"result\": %s }" % json.dumps(d)

return result

Expand Down Expand Up @@ -170,7 +170,7 @@ def get_datastore_property(self, msg):
else:
return "{ \"success\": -1, \"msg\": \"Unable to find datastore %s\" }" % msg["info.url"]

result = "{ \"status\": 0, \"msg\": \"Successfully retrieved property\", \"result\": \"%s\" }" % json.dumps(d)
result = "{ \"status\": 0, \"msg\": \"Successfully retrieved property\", \"result\": %s }" % json.dumps(d)

return result

Expand Down

0 comments on commit 70f5e6d

Please sign in to comment.