mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Use handle_exception function in cloud cli.py
This commit is contained in:
parent
f91edf3a33
commit
3f3005c746
@ -197,8 +197,9 @@ class SaltCloud(parsers.SaltCloudParser):
|
||||
log.info('Applying map from {0!r}.'.format(self.config['map']))
|
||||
try:
|
||||
names = mapper.get_vmnames_by_action(self.options.action)
|
||||
except SaltCloudException:
|
||||
return []
|
||||
except SaltCloudException as exc:
|
||||
msg = 'There was an error actioning virtual machines.'
|
||||
self.handle_exception(msg, exc)
|
||||
else:
|
||||
names = self.config.get('names', None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user