Esempio n. 1
0
 def ReportSingle(self,
                  text,
                  count,
                  subtext='',
                  queued_text='',
                  queued=0,
                  subcount=0,
                  process_subcounts=True):
     if not count:
         return []
     if isinstance(count, Counter) and process_subcounts:
         if count.queued:
             queued = count.queued.val
         if count.completed.subcount:
             subcount = count.completed.subcount.val
     if not queued_text:
         queued_text = self.info.str_value('queued')
     strs = [
         self.info.FormatLine("%s {r} %s" % (counts_as_str(count), text),
                              self.count)
     ]
     if process_subcounts:
         if queued:
             strs.append("-%-3d of these were queued%s" %
                         (queued, queued_text))
         if subcount:
             strs.append("-%-3d of these were successfully%s " %
                         (subcount, subtext))
     return strs
Esempio n. 2
0
 def ReportSingle(self, text, count, subtext='', queued_text='', queued=0, subcount=0, process_subcounts=True):
     if not count:
         return []
     if isinstance(count, Counter) and process_subcounts:
         if count.queued:
             queued = count.queued.val
         if count.completed.subcount:
             subcount = count.completed.subcount.val
     if not queued_text:
         queued_text = self.info.str_value('queued')
     strs = [self.info.FormatLine("%s {r} %s" % (counts_as_str(count), text), self.count)]
     if process_subcounts:
         if queued:
             strs.append("-%-3d of these were queued%s" % (queued, queued_text))
         if subcount:
             strs.append("-%-3d of these were successfully%s " % (subcount, subtext))
     return strs
Esempio n. 3
0
 def ReportHeader(self):
     return None if not self.counts.total else self.info.FormatLine(
         "%s {r} were processed" %
         counts_as_str(self.counts.total, self.counts.max),
         self.counts.total)
Esempio n. 4
0
 def ReportHeader(self):
     return None if not self.counts.total else self.info.FormatLine(
         "%s {r} were processed" % counts_as_str(self.counts.total, self.counts.max), self.counts.total)