diff options
author | Sergey Kraynev <skraynev@mirantis.com> | 2014-09-01 09:57:12 -0400 |
---|---|---|
committer | Sergey Kraynev <skraynev@mirantis.com> | 2014-09-25 08:08:18 -0400 |
commit | 8faef30895d5b3550d50672fc454acc37992008a (patch) | |
tree | 56443707008a51f77afe0255878b6fde3c970a40 | |
parent | a7d10dc43b0d2baa48cabd97781098d14208ecec (diff) | |
download | heat-8faef30895d5b3550d50672fc454acc37992008a.tar.gz |
Improve error handling in api files
Change-Id: Ib9dccf5641d72aa5d16ad3179d0df030c7664fa6
Closes-Bug: #1364018
-rwxr-xr-x | bin/heat-api | 4 | ||||
-rwxr-xr-x | bin/heat-api-cfn | 4 | ||||
-rwxr-xr-x | bin/heat-api-cloudwatch | 4 |
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) |