Revision a9598baf kamaki/cli/commands/cyclades.py

b/kamaki/cli/commands/cyclades.py
77 77

  
78 78
    def _wait(self, service, service_id, status_method, currect_status):
79 79
        (progress_bar, wait_cb) = self._safe_progress_bar(
80
            '%s %s still in %s mode' % (service, service_id, currect_status))
80
            '%s %s: periodically check if status is %s' % (
81
                service, service_id, currect_status))
81 82

  
82 83
        try:
83 84
            new_mode = status_method(
84 85
                service_id, currect_status, wait_cb=wait_cb)
86
            if new_mode:
87
                self.error('\n%s %s: status is %s' % (
88
                    service, service_id, new_mode))
89
            else:
90
                self.error('\nTime out: %s %s still in %s' % (
91
                    service, service_id, currect_status))
92
        except KeyboardInterrupt:
93
            self.error('\n- canceled')
85 94
        finally:
86 95
            self._safe_progress_bar_finish(progress_bar)
87
        if new_mode:
88
            self.error('%s %s is now in %s mode' % (
89
                service, service_id, new_mode))
90
        else:
91
            raiseCLIError(None, 'Time out')
92 96

  
93 97

  
94 98
class _server_wait(_service_wait):

Also available in: Unified diff