Add suggested changes

This commit is contained in:
twangboy 2018-05-23 13:34:33 -06:00
parent e27e9fd1e7
commit 6eff2f847b
No known key found for this signature in database
GPG Key ID: 93FF3BDEB278C9EB
2 changed files with 2 additions and 2 deletions

View File

@ -826,7 +826,7 @@ def get_encoding(path):
]
for _encoding, bom in boms:
if _data.startswith(bom):
log.debug('Found BOM for {0}'.format(_encoding))
log.debug('Found BOM for %s', _encoding)
return _encoding
return False

View File

@ -237,7 +237,7 @@ class FileBlockReplaceTestCase(TestCase, LoaderModuleMockMixin):
'__grains__': {'kernel': 'Linux'},
'__utils__': {
'files.is_binary': MagicMock(return_value=False),
'files.get_encoding': MagicMock(return_value=None)
'files.get_encoding': MagicMock(return_value='utf-8')
},
}
}