Merge "Log tracebacks"

This commit is contained in:
Zuul 2018-07-24 04:49:27 +00:00 committed by Gerrit Code Review
commit a33b1499d7
2 changed files with 2 additions and 3 deletions

View File

@ -13,8 +13,6 @@
# under the License.
#
import sys
import traceback
"""Exception definitions"""
@ -38,7 +36,6 @@ class NotFound(Exception):
class DeploymentError(RuntimeError):
"""Deployment failed"""
def __init__(self, *args, **kwargs):
traceback.format_exception(*sys.exc_info())
super(RuntimeError, self).__init__(*args, **kwargs)

View File

@ -27,6 +27,7 @@ import subprocess
import sys
import tarfile
import tempfile
import traceback
import yaml
from cliff import command
@ -1107,6 +1108,7 @@ class Deploy(command.Command):
rc = self._launch_ansible_deploy(self.ansible_dir)
except Exception as e:
self.log.error("Exception: %s" % six.text_type(e))
self.log.error(traceback.print_exc())
raise exceptions.DeploymentError(six.text_type(e))
finally:
if not parsed_args.keep_running: