Merge pull request #42995 from twangboy/win_fix_invalid_requisite

Fix malformed requisite for Windows
This commit is contained in:
Mike Place 2017-08-22 10:50:00 -06:00 committed by GitHub
commit d347d1cf8f

View file

@ -2122,11 +2122,14 @@ class State(object):
reqs[r_state].append(chunk)
continue
try:
if (fnmatch.fnmatch(chunk['name'], req_val) or
fnmatch.fnmatch(chunk['__id__'], req_val)):
if req_key == 'id' or chunk['state'] == req_key:
found = True
reqs[r_state].append(chunk)
if isinstance(req_val, six.string_types):
if (fnmatch.fnmatch(chunk['name'], req_val) or
fnmatch.fnmatch(chunk['__id__'], req_val)):
if req_key == 'id' or chunk['state'] == req_key:
found = True
reqs[r_state].append(chunk)
else:
raise KeyError
except KeyError as exc:
raise SaltRenderError(
'Could not locate requisite of [{0}] present in state with name [{1}]'.format(