mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
pillar/reclass_adapter.py: string.find(X) > -1 ==> X in string
This commit is contained in:
parent
f3e6e34ae3
commit
b60e305b8b
@ -87,7 +87,7 @@ def ext_pillar(minion_id, pillar, **kwargs):
|
||||
return reclass_ext_pillar(minion_id, pillar, **kwargs)
|
||||
|
||||
except TypeError as e:
|
||||
if e.message.find('unexpected keyword argument') > -1:
|
||||
if 'unexpected keyword argument' in e.message:
|
||||
arg = e.message.split()[-1]
|
||||
raise SaltInvocationError('ext_pillar.reclass: unexpected option: '\
|
||||
+ arg)
|
||||
@ -95,7 +95,7 @@ def ext_pillar(minion_id, pillar, **kwargs):
|
||||
raise
|
||||
|
||||
except KeyError as e:
|
||||
if e.message.find('id') > -1:
|
||||
if 'id' in e.message:
|
||||
raise SaltInvocationError('ext_pillar.reclass: __opts__ does not '\
|
||||
'define minion ID')
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user