- Timestamp:
- 03/23/05 14:48:13 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r2180 r2181 119 119 def waitPrinting(self) : 120 120 """Waits for printer status being 'printing'.""" 121 firstvalue = None 121 122 while 1: 122 123 self.retrieveSNMPValues() … … 124 125 if statusAsString in ('printing', 'warmup') : 125 126 break 127 if self.printerInternalPageCounter is not None : 128 if firstvalue is None : 129 # first time we retrieved a page counter, save it 130 firstvalue = self.PrinterInternalPageCounter 131 else : 132 # second time (or later) 133 if firstvalue < self.PrinterInternalPageCounter : 134 # Here we have a printer which lies : 135 # it says it is not printing or warming up 136 # BUT the page counter increases !!! 137 # So we can probably quit being sure it is printing. 138 self.parent.filter.printInfo("Printer %s is lying to us !!!" % self.parent.filter.printername, "warn") 139 break 126 140 self.parent.filter.logdebug(_("Waiting for printer %s to be printing...") % self.parent.filter.printername) 127 141 time.sleep(ITERATIONDELAY)