Make sure output file works for salt cloud

This commit is contained in:
Aditya Kulkarni 2015-12-23 16:06:05 -05:00 committed by rallytime
parent 654cab0314
commit 16e1df90e9

View File

@ -81,10 +81,9 @@ class SaltCloud(parsers.SaltCloudParser):
if self.options.update_bootstrap:
ret = salt.utils.cloud.update_bootstrap(self.config)
display_output = salt.output.get_printout(
self.options.output, self.config
)
print(display_output(ret))
salt.output.display_output(ret,
self.options.output,
opts=self.config)
self.exit(salt.defaults.exitcodes.EX_OK)
log.info('salt-cloud starting')
@ -357,11 +356,9 @@ class SaltCloud(parsers.SaltCloudParser):
else:
self.error('Nothing was done. Using the proper arguments?')
display_output = salt.output.get_printout(
self.options.output, self.config
)
# display output using salt's outputter system
print(display_output(ret))
salt.output.display_output(ret,
self.options.output,
opts=self.config)
self.exit(salt.defaults.exitcodes.EX_OK)
def print_confirm(self, msg):