summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-09-29 20:35:21 +0000
committerGerrit Code Review <review@openstack.org>2014-09-29 20:35:21 +0000
commit1ab14e0edaf3f37689a827010bd3f64a54cdc76e (patch)
treed6ca4b6cf1c5b55f5503e17d2ee0f1ddb6d5a6df /bin
parent8be4e9041c5b9c5936656ae037c6d696a90f0f53 (diff)
parent8faef30895d5b3550d50672fc454acc37992008a (diff)
downloadheat-1ab14e0edaf3f37689a827010bd3f64a54cdc76e.tar.gz
Merge "Improve error handling in api files"
Diffstat (limited to 'bin')
-rwxr-xr-xbin/heat-api4
-rwxr-xr-xbin/heat-api-cfn4
-rwxr-xr-xbin/heat-api-cloudwatch4
3 files changed, 9 insertions, 3 deletions
diff --git a/bin/heat-api b/bin/heat-api
index a05a64bdb..18c619156 100755
--- a/bin/heat-api
+++ b/bin/heat-api
@@ -20,6 +20,7 @@ import eventlet
eventlet.monkey_patch(os=False)
import os
+import six
import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that
@@ -61,4 +62,5 @@ if __name__ == '__main__':
systemd.notify_once()
server.wait()
except RuntimeError as e:
- sys.exit("ERROR: %s" % e)
+ msg = six.text_type(e)
+ sys.exit("ERROR: %s" % msg)
diff --git a/bin/heat-api-cfn b/bin/heat-api-cfn
index 079a8b939..fa0dd60e6 100755
--- a/bin/heat-api-cfn
+++ b/bin/heat-api-cfn
@@ -22,6 +22,7 @@ import eventlet
eventlet.monkey_patch(os=False)
import os
+import six
import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that
@@ -63,4 +64,5 @@ if __name__ == '__main__':
systemd.notify_once()
server.wait()
except RuntimeError as e:
- sys.exit("ERROR: %s" % e)
+ msg = six.text_type(e)
+ sys.exit("ERROR: %s" % msg)
diff --git a/bin/heat-api-cloudwatch b/bin/heat-api-cloudwatch
index ad966c61c..c7d933a2b 100755
--- a/bin/heat-api-cloudwatch
+++ b/bin/heat-api-cloudwatch
@@ -22,6 +22,7 @@ import eventlet
eventlet.monkey_patch(os=False)
import os
+import six
import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that
@@ -63,4 +64,5 @@ if __name__ == '__main__':
systemd.notify_once()
server.wait()
except RuntimeError as e:
- sys.exit("ERROR: %s" % e)
+ msg = six.text_type(e)
+ sys.exit("ERROR: %s" % msg)