From 7276610595499ab45872d1b0587effc3dba195e2 Mon Sep 17 00:00:00 2001 From: Noam Angel Date: Thu, 27 Dec 2018 08:35:45 +0000 Subject: [PATCH] fix multiple server delete produce multiple new lines Closes-Bug: #1809874 Change-Id: Ib988b189b41af03d3d871b660bb5b5cc090c3f30 --- openstackclient/compute/v2/server.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 3534fc7d9a..b608ecbd52 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -999,13 +999,9 @@ class DeleteServer(command.Command): compute_client.servers, server) compute_client.servers.delete(server_obj.id) if parsed_args.wait: - if utils.wait_for_delete( - compute_client.servers, - server_obj.id, - callback=_show_progress, - ): - self.app.stdout.write('\n') - else: + if not utils.wait_for_delete(compute_client.servers, + server_obj.id, + callback=_show_progress): LOG.error(_('Error deleting server: %s'), server_obj.id) self.app.stdout.write(_('Error deleting server\n'))