Changeset 2027 for pykota/trunk
- Timestamp:
- 01/12/05 23:44:06 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r1949 r2027 22 22 # 23 23 # $Log$ 24 # Revision 1.35 2005/01/12 22:44:06 jalet 25 # Tried to fix a problem with printers which are slow to pass into printing mode. 26 # 24 27 # Revision 1.34 2004/11/19 11:57:51 jalet 25 28 # Modified the SNMP fix as hinted by pysnmp's maintainer … … 221 224 self.retrieveSNMPValues() 222 225 statusAsString = printerStatusValues.get(self.printerStatus) 223 if statusAsString in (' idle', 'printing') :226 if statusAsString in ('printing',) : 224 227 break 225 self.parent.filter.logdebug(_("Waiting for printer %s to be idle orprinting...") % self.parent.filter.printername)228 self.parent.filter.logdebug(_("Waiting for printer %s to be printing...") % self.parent.filter.printername) 226 229 time.sleep(ITERATIONDELAY) 227 230 … … 311 314 while 1: 312 315 self.retrievePJLValues() 313 if self.printerStatus in ('100 00', '10001', '10023', '35078') :316 if self.printerStatus in ('10023',) : 314 317 break 315 self.parent.filter.logdebug(_("Waiting for printer %s to be idle orprinting...") % self.parent.filter.printername)318 self.parent.filter.logdebug(_("Waiting for printer %s to be printing...") % self.parent.filter.printername) 316 319 time.sleep(ITERATIONDELAY) 317 320 … … 474 477 if (os.environ.get("PYKOTASTATUS") != "CANCELLED") and \ 475 478 (os.environ.get("PYKOTAACTION") != "DENY") and \ 476 (os.environ.get("PYKOTAPHASE") == "AFTER") : 479 (os.environ.get("PYKOTAPHASE") == "AFTER") and \ 480 self.filter.jobSizeBytes : 477 481 acc.waitPrinting() 478 482 acc.waitIdle() … … 490 494 if (os.environ.get("PYKOTASTATUS") != "CANCELLED") and \ 491 495 (os.environ.get("PYKOTAACTION") != "DENY") and \ 492 (os.environ.get("PYKOTAPHASE") == "AFTER") : 496 (os.environ.get("PYKOTAPHASE") == "AFTER") and \ 497 self.filter.jobSizeBytes : 493 498 acc.waitPrinting() 494 499 acc.waitIdle()