summaryrefslogtreecommitdiff
path: root/heatclient/v1
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-04-02 01:23:40 +0000
committerGerrit Code Review <review@openstack.org>2014-04-02 01:23:40 +0000
commitf42c1c9a9bbcd425d8f97d185782ee829d309510 (patch)
treeb062f803a26f674f5ce6a9eeef08bb749fe1c6d1 /heatclient/v1
parentdd10b2b2cfc2e7a53b4f543930904b47626f745f (diff)
parent30ce6d920f66571e5199828b66a0fe4dbf25c2c2 (diff)
downloadpython-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.py3
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: