trivial: Print list of Deckhand errors during rendering

This patchset updates pegleg.engine.deckhand to also log the
errors associated with an exception object following a rendering
failure to aid with troubleshooting.

Change-Id: I9ca46e4b102bd39fb7c582bb1720702892df7f9e
This commit is contained in:
Felipe Monteiro 2018-06-07 16:37:09 -04:00
parent d9692126ed
commit 5bef5c2c0e
2 changed files with 6 additions and 4 deletions

View File

@ -57,8 +57,10 @@ def deckhand_render(documents=[],
validate=validate)
rendered_documents = [dict(d) for d in deckhand_eng.render()]
except dh_errors.DeckhandException as e:
errors.append((DECKHAND_RENDER_EXCEPTION,
'An unknown Deckhand exception occurred while trying'
' to render documents: %s' % str(e)))
errors.append(
(DECKHAND_RENDER_EXCEPTION,
'An unknown Deckhand exception occurred while trying'
' to render documents: %s. Details: %s.' % (str(e),
e.error_list)))
return rendered_documents, errors

View File

@ -22,7 +22,7 @@ whitelist_externals = tox
[testenv:pep8]
commands =
tox -c src/bin/pegleg/tox.ini -e lint
tox -c src/bin/pegleg/tox.ini -e pep8
whitelist_externals = tox
[testenv:docs]