spacewalk.call raises error on fail

This commit is contained in:
Benedikt Werner 2016-10-30 15:40:10 +01:00
parent e7c47edfe8
commit 7521b64f03

View File

@ -186,7 +186,8 @@ def call(server, command, *args, **kwargs):
try:
output = endpoint(key, *arguments)
except Exception as e:
raise Exception('Spacewalk call failed: {0}'.format(e))
raise Exception('Spacewalk call failed: {0}'.format(str(e)))
output = 'failed'
call = '{0} {1}'.format(command, arguments)
return {call: output}