Merge pull request #48454 from terminalmage/issue48107

Improve error message when ext_pillar is incorrectly formatted
This commit is contained in:
Nicole Thomas 2018-07-06 14:03:43 -04:00 committed by GitHub
commit dd6a6a97c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -588,11 +588,19 @@ class Master(SMaster):
pass
if self.opts.get('git_pillar_verify_config', True):
git_pillars = [
x for x in self.opts.get('ext_pillar', [])
if 'git' in x
and not isinstance(x['git'], six.string_types)
]
try:
git_pillars = [
x for x in self.opts.get('ext_pillar', [])
if 'git' in x
and not isinstance(x['git'], six.string_types)
]
except TypeError:
git_pillars = []
critical_errors.append(
'Invalid ext_pillar configuration. It is likely that the '
'external pillar type was not specified for one or more '
'external pillars.'
)
if git_pillars:
try:
new_opts = copy.deepcopy(self.opts)