Changeset 2027

Show
Ignore:
Timestamp:
01/12/05 23:44:06 (18 years ago)
Author:
jalet
Message:

Tried to fix a problem with printers which are slow to pass into printing mode.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/hardware.py

    r1949 r2027  
    2222# 
    2323# $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# 
    2427# Revision 1.34  2004/11/19 11:57:51  jalet 
    2528# Modified the SNMP fix as hinted by pysnmp's maintainer 
     
    221224                self.retrieveSNMPValues() 
    222225                statusAsString = printerStatusValues.get(self.printerStatus) 
    223                 if statusAsString in ('idle', 'printing') : 
     226                if statusAsString in ('printing',) : 
    224227                    break 
    225                 self.parent.filter.logdebug(_("Waiting for printer %s to be idle or printing...") % self.parent.filter.printername)     
     228                self.parent.filter.logdebug(_("Waiting for printer %s to be printing...") % self.parent.filter.printername)     
    226229                time.sleep(ITERATIONDELAY) 
    227230             
     
    311314        while 1: 
    312315            self.retrievePJLValues() 
    313             if self.printerStatus in ('10000', '10001', '10023', '35078') : 
     316            if self.printerStatus in ('10023',) : 
    314317                break 
    315             self.parent.filter.logdebug(_("Waiting for printer %s to be idle or printing...") % self.parent.filter.printername) 
     318            self.parent.filter.logdebug(_("Waiting for printer %s to be printing...") % self.parent.filter.printername) 
    316319            time.sleep(ITERATIONDELAY) 
    317320         
     
    474477            if (os.environ.get("PYKOTASTATUS") != "CANCELLED") and \ 
    475478               (os.environ.get("PYKOTAACTION") != "DENY") and \ 
    476                (os.environ.get("PYKOTAPHASE") == "AFTER") : 
     479               (os.environ.get("PYKOTAPHASE") == "AFTER") and \ 
     480               self.filter.jobSizeBytes : 
    477481                acc.waitPrinting() 
    478482            acc.waitIdle()     
     
    490494            if (os.environ.get("PYKOTASTATUS") != "CANCELLED") and \ 
    491495               (os.environ.get("PYKOTAACTION") != "DENY") and \ 
    492                (os.environ.get("PYKOTAPHASE") == "AFTER") : 
     496               (os.environ.get("PYKOTAPHASE") == "AFTER") and \ 
     497               self.filter.jobSizeBytes : 
    493498                acc.waitPrinting() 
    494499            acc.waitIdle()