From 5acb540665befa4c0a67dc72d307d702c9062436 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Mon, 4 Jun 2018 13:17:31 -0400 Subject: [PATCH] trivial: Fix error message format This patchset fixes the error message format of a string that isn't doing correct string substitution. This corrects that. Change-Id: I2e16e231c7bf1633b41ab30a7f910e9bfb4e416e --- deckhand/engine/secrets_manager.py | 2 +- deckhand/tests/unit/engine/test_document_layering.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deckhand/engine/secrets_manager.py b/deckhand/engine/secrets_manager.py index dd44ef2b..1985586b 100644 --- a/deckhand/engine/secrets_manager.py +++ b/deckhand/engine/secrets_manager.py @@ -353,7 +353,7 @@ class SecretsSubstitution(object): else: message = ('Could not find substitution source document ' '[%s] %s among the provided substitution ' - 'sources.', src_schema, src_name) + 'sources.' % (src_schema, src_name)) if self._fail_on_missing_sub_src: LOG.error(message) raise errors.SubstitutionSourceNotFound( diff --git a/deckhand/tests/unit/engine/test_document_layering.py b/deckhand/tests/unit/engine/test_document_layering.py index b4bc8971..a4e68600 100644 --- a/deckhand/tests/unit/engine/test_document_layering.py +++ b/deckhand/tests/unit/engine/test_document_layering.py @@ -134,7 +134,7 @@ class TestDocumentLayeringScenarios(TestDocumentLayering): self._test_layering(documents, site_expected={}, fail_on_missing_sub_src=False) self.assertTrue(m_log.warning.called) - self.assertRegex(m_log.warning.mock_calls[0][1][0][0], + self.assertRegex(m_log.warning.mock_calls[0][1][0], r'Could not find substitution source document .*') def test_layering_substitution_source_skips_layering(self):