From 006d33e18fb3d5d51bd61c5044a47c9073fc8b74 Mon Sep 17 00:00:00 2001 From: Hiroki Ito Date: Fri, 30 Jun 2017 06:59:55 +0000 Subject: [PATCH] Remove unnecessary output Blazar CLI outputs unnecessary messages when creating, updating and deleting resources such like "', mode 'w' at 0x7f7e3067f150>". This commit fixes these output messages. Change-Id: I87838dabe40039778908ad2d14426d5d2bfcfff7 --- blazarclient/command.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blazarclient/command.py b/blazarclient/command.py index 0ed7b00..36d958c 100644 --- a/blazarclient/command.py +++ b/blazarclient/command.py @@ -131,7 +131,7 @@ class CreateCommand(BlazarCommand, show.ShowOne): self.format_output_data(data) if data: - print(self.app.stdout, 'Created a new %s:' % self.resource) + print('Created a new %s:' % self.resource, file=self.app.stdout) else: data = {'': ''} return zip(*sorted(six.iteritems(data))) @@ -169,8 +169,8 @@ class UpdateCommand(BlazarCommand): res_id = parsed_args.id resource_manager = getattr(blazar_client, self.resource) resource_manager.update(res_id, **body) - print(self.app.stdout, 'Updated %s: %s' % (self.resource, - parsed_args.id)) + print('Updated %s: %s' % (self.resource, parsed_args.id), + file=self.app.stdout) return @@ -203,8 +203,8 @@ class DeleteCommand(BlazarCommand): else: res_id = parsed_args.id resource_manager.delete(res_id) - print(self.app.stdout, 'Deleted %s: %s' % (self.resource, - parsed_args.id)) + print('Deleted %s: %s' % (self.resource, parsed_args.id), + file=self.app.stdout) return