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)