mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Make digital ocean handle errors a little better
This commit is contained in:
parent
870f150129
commit
0656e10fb0
@ -496,10 +496,7 @@ def query(method='droplets', droplet_id=None, command=None, args=None):
|
||||
result = json.loads(content)
|
||||
if result.get('status', '').lower() == 'error':
|
||||
raise SaltCloudSystemExit(
|
||||
''.join(
|
||||
'{0}: {1}\n'.format(k, '\n'.join(v)) for (k, v) in
|
||||
result.get('error_message', {}).items()
|
||||
)
|
||||
pprint.pformat(result.get('error_message', {}))
|
||||
)
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user