Show
Ignore:
Timestamp:
02/15/05 00:39:50 (19 years ago)
Author:
jalet
Message:

Introduces the new 'trustjobsize' directive to workaround some printers
generating unstable internal page counter values when queried through SNMP.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2060 r2062  
    2424# 
    2525# $Log$ 
     26# Revision 1.88  2005/02/14 23:39:50  jalet 
     27# Introduces the new 'trustjobsize' directive to workaround some printers 
     28# generating unstable internal page counter values when queried through SNMP. 
     29# 
    2630# Revision 1.87  2005/02/14 22:53:44  jalet 
    2731# Now always precomputes the job's size with the internal PDL parser, and not 
     
    625629                if self.softwareJobSize and (jobsize != self.softwareJobSize) : 
    626630                    self.printInfo(_("Beware : computed job size (%s) != precomputed job size (%s)") % (jobsize, self.softwareJobSize), "error") 
     631                    (limit, replacement) = self.config.getTrustJobSize(printer.Name) 
     632                    if limit is None : 
     633                        self.printInfo(_("The job size will be trusted anyway according to the 'trustjobsize' directive"), "warn") 
     634                    else : 
     635                        if jobsize <= limit : 
     636                            self.printInfo(_("The job size will be trusted because it is inferior to the 'trustjobsize' directive's limit %s") % limit, "warn") 
     637                        else : 
     638                            self.printInfo(_("The job size will be modified according to the 'trustjobsize' directive : %s") % replacement, "warn") 
     639                            if replacement == "PRECOMPUTED" : 
     640                                jobsize = self.softwareJobSize 
     641                            else :     
     642                                jobsize = replacement 
    627643                jobsize += bannersize     
    628644            self.printMoreInfo(user, printer, _("Job size : %i") % jobsize)