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
This commit is contained in:
Felipe Monteiro 2018-06-04 13:17:31 -04:00
parent b8050a65ef
commit 5acb540665
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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):