src/modules/client/progress.py
changeset 2619 a439e7e6a4d3
parent 2539 82d3275709e9
child 2671 20a5c9aa2e6d
equal deleted inserted replaced
2618:516751269848 2619:a439e7e6a4d3
   905                         msg = _("Refreshing catalog %(current)d/%(total)d "
   905                         msg = _("Refreshing catalog %(current)d/%(total)d "
   906                             "%(publisher)s") % {
   906                             "%(publisher)s") % {
   907                             "current": self.refresh_cur_pub_cnt,
   907                             "current": self.refresh_cur_pub_cnt,
   908                             "total": self.refresh_pub_cnt,
   908                             "total": self.refresh_pub_cnt,
   909                             "publisher": self.refresh_cur_pub }
   909                             "publisher": self.refresh_cur_pub }
   910                         msg = "%s%s" % (self.msg_prefix, msg)
       
   911                         self.curstrlen = len(msg)
   910                         self.curstrlen = len(msg)
   912                         print "%s" % msg,
   911                         print "%s" % msg,
   913                         self.needs_cr = True
   912                         self.needs_cr = True
   914                         sys.stdout.flush()
   913                         sys.stdout.flush()
   915                 except IOError, e:
   914                 except IOError, e:
   924                 # Ensure the last message displayed is flushed in case the
   923                 # Ensure the last message displayed is flushed in case the
   925                 # corresponding operation did not complete successfully.
   924                 # corresponding operation did not complete successfully.
   926                 self.__generic_done()
   925                 self.__generic_done()
   927 
   926 
   928                 msg = _("Creating Plan")
   927                 msg = _("Creating Plan")
   929                 msg = "%s%s" % (self.msg_prefix, msg)
       
   930 
   928 
   931                 self.curstrlen = len(msg)
   929                 self.curstrlen = len(msg)
   932                 try:
   930                 try:
   933                         print "%s" % msg,
   931                         print "%s" % msg,
   934                         self.needs_cr = True
   932                         self.needs_cr = True
   946                 self.spinner = (self.spinner + 1) % len(self.spinner_chars)
   944                 self.spinner = (self.spinner + 1) % len(self.spinner_chars)
   947                 try:
   945                 try:
   948                         print self.cr,
   946                         print self.cr,
   949                         msg = _("Creating Plan %c") % self.spinner_chars[
   947                         msg = _("Creating Plan %c") % self.spinner_chars[
   950                             self.spinner]
   948                             self.spinner]
   951                         msg = "%s%s" % (self.msg_prefix, msg)
       
   952 
   949 
   953                         self.curstrlen = len(msg)
   950                         self.curstrlen = len(msg)
   954                         print "%s" % msg,
   951                         print "%s" % msg,
   955                         self.needs_cr = True
   952                         self.needs_cr = True
   956                         sys.stdout.flush()
   953                         sys.stdout.flush()
  1246         def index_optimize(self):
  1243         def index_optimize(self):
  1247                 self.ind_started = False
  1244                 self.ind_started = False
  1248                 self.last_print_time = 0
  1245                 self.last_print_time = 0
  1249                 try:
  1246                 try:
  1250                         msg = _("Optimizing Index...")
  1247                         msg = _("Optimizing Index...")
  1251                         msg = "%s%s" % (self.msg_prefix, msg)
       
  1252 
  1248 
  1253                         print msg
  1249                         print msg
  1254                         sys.stdout.flush()
  1250                         sys.stdout.flush()
  1255                 except IOError, e:
  1251                 except IOError, e:
  1256                         if e.errno == errno.EPIPE:
  1252                         if e.errno == errno.EPIPE: