StackStorm/st2 — pull request #868 by lakshmi-kannan (2014-12-05 19:49:48+00:00)
Title: json.dumps the output from Python actions [structured data support]

* Fix: Update pack_mgmt/download.py to not call json.dumps

```
(virtualenv)~/stanley git:structured_data_pythonrunner ❯❯❯ st2 run packs.install packs=aws ✭ ◼
....................
+-----------------+---------------------------------------------------------+
| Property | Value |
+-----------------+---------------------------------------------------------+
| id | 54820c3c0640fd450972e572 |
| context | { |
| | "user": "lakshmi" |
| | } |
| parameters | { |
| | "packs": [ |
| | "aws" |
| | ] |
| | } |
| status | failed |
| start_timestamp | 2014-12-05T19:49:16.618000Z |
| result | { |
| | "download": { |
| | "stdout": "", |
| | "exit_code": 0, |
| | "stderr": "", |
| | "result": "{\"aws\": \"Success.\"}" |
| | }, |
| | "virtualenv_prerun": { |
| | "stdout": "", |
| | "exit_code": 0, |
| | "stderr": "", |
| | "result": "[\"aws\"]" |
| | }, |
| | "setup_virtualenv": { |
| | "stdout": "", |
| | "exit_code": 1, |
| | "stderr": |
| | "st2.actions.python.SetupVirtualEnvironmentAction: |
| | DEBUG Setting up virtualenv for pack |
| | \"aws\"\nTraceback (most recent call last):\n File \"/ |
| | home/lakshmi/stanley/st2actions/st2actions/runners/pyth |
| | on_action_wrapper.py\", line 106, in \n |
| | obj.run()\n File \"/home/lakshmi/stanley/st2actions/st |
| | 2actions/runners/python_action_wrapper.py\", line 57, |
| | in run\n output = action.run(**self._parameters)\n |
| | File \"/opt/stackstorm/packs/packs/actions/pack_mgmt/se |
| | tup_virtualenv.py\", line 45, in run\n |
| | self._setup_pack_virtualenv(pack_name=pack_name)\n |
| | File \"/opt/stackstorm/packs/packs/actions/pack_mgmt/se |
| | tup_virtualenv.py\", line 72, in |
| | _setup_pack_virtualenv\n |
| | os.makedirs(self._base_virtualenvs_path)\n File \"/hom |
| | e/lakshmi/stanley/virtualenv/lib/python2.7/os.py\", |
| | line 157, in makedirs\n mkdir(name, mode)\nOSError: |
| | [Errno 13] Permission denied: |
| | '/opt/stackstorm/virtualenvs/'\n", |
| | "result": null |
| | } |
| | } |
| action | packs.install |
| callback | |
+-----------------+---------------------------------------------------------+
(virtualenv)~/stanley git:structured_data_pythonrunner ❯❯❯
```