mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
spacewalk.call doesn't raise error on fail anymore
This commit is contained in:
parent
7521b64f03
commit
75320be9c1
@ -183,14 +183,17 @@ def call(server, command, *args, **kwargs):
|
||||
namespace, method = command.split('.')
|
||||
endpoint = getattr(getattr(client, namespace), method)
|
||||
|
||||
ret = {}
|
||||
try:
|
||||
output = endpoint(key, *arguments)
|
||||
ret['result'] = True
|
||||
except Exception as e:
|
||||
raise Exception('Spacewalk call failed: {0}'.format(str(e)))
|
||||
output = 'failed'
|
||||
ret['result'] = False
|
||||
|
||||
call = '{0} {1}'.format(command, arguments)
|
||||
return {call: output}
|
||||
ret[call] = output
|
||||
return ret
|
||||
|
||||
|
||||
def addGroupsToKey(server, activation_key, groups):
|
||||
|
Loading…
Reference in New Issue
Block a user