diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-04-02 01:23:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-04-02 01:23:40 +0000 |
commit | f42c1c9a9bbcd425d8f97d185782ee829d309510 (patch) | |
tree | b062f803a26f674f5ce6a9eeef08bb749fe1c6d1 /heatclient/v1 | |
parent | dd10b2b2cfc2e7a53b4f543930904b47626f745f (diff) | |
parent | 30ce6d920f66571e5199828b66a0fe4dbf25c2c2 (diff) | |
download | python-heatclient-f42c1c9a9bbcd425d8f97d185782ee829d309510.tar.gz |
Merge "Python 3: decode bytes before feeding them to jsonutils.loads()"
Diffstat (limited to 'heatclient/v1')
-rw-r--r-- | heatclient/v1/shell.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index 9ffee78..ae55cdb 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -14,6 +14,7 @@ # under the License. import logging +import six from six.moves.urllib import request import yaml @@ -663,6 +664,8 @@ def do_resource_signal(hc, args): data_url = template_utils.normalise_file_path_to_url(data_file) data = request.urlopen(data_url).read() if data: + if isinstance(data, six.binary_type): + data = data.decode('utf-8') try: data = jsonutils.loads(data) except ValueError as ex: |