fix issue where the name may be in 2 places

This commit is contained in:
Thomas S Hatch 2016-01-01 12:40:06 -07:00 committed by rallytime
parent 5f0326e521
commit fb0cbd185e

View file

@ -260,10 +260,14 @@ def mock_ret(cdata):
'''
# As this is expanded it should be sent into the execution module
# layer or it should be turned into a standalone loader system
return = {'name': cdata['name'],
'comment': 'Not called, mocked',
'changes': {},
'result': True}
if cdata['args']:
name = cdata['args'][0]
else:
name = cdata['kwargs']['name']
return {'name': name,
'comment': 'Not called, mocked',
'changes': {},
'result': True}
class StateError(Exception):