From a10f556197fa11bb607ba8fe0e13374a5b862266 Mon Sep 17 00:00:00 2001 From: Stavros Sachtouris Date: Wed, 5 Dec 2012 12:08:14 +0200 Subject: [PATCH 1/1] Progress bar apears asap --- kamaki/cli/argument.py | 1 + kamaki/cli/commands/cyclades_cli.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kamaki/cli/argument.py b/kamaki/cli/argument.py index 9331ada..f52bb0e 100644 --- a/kamaki/cli/argument.py +++ b/kamaki/cli/argument.py @@ -309,6 +309,7 @@ class ProgressBarArgument(FlagArgument): return self.value self.bar.message = message.ljust(message_len) self.bar.suffix = '%(percent)d%% - %(eta)ds' + self.bar.start() def progress_gen(n): for i in self.bar.iter(range(int(n))): diff --git a/kamaki/cli/commands/cyclades_cli.py b/kamaki/cli/commands/cyclades_cli.py index 06034d5..c01d973 100644 --- a/kamaki/cli/commands/cyclades_cli.py +++ b/kamaki/cli/commands/cyclades_cli.py @@ -439,9 +439,9 @@ class server_wait(_init_cyclades): progress_bar.finish() raiseCLIError(err) if new_mode: - print('\nServer %s is now in %s mode' % (server_id, new_mode)) + print('Server %s is now in %s mode' % (server_id, new_mode)) else: - print('\nTime out') + print('Time out') @command(flavor_cmds) -- 1.7.10.4