Show
Ignore:
Timestamp:
05/25/04 07:17:52 (20 years ago)
Author:
jalet
Message:

Now precomputes the job's size only if current printer's enforcement
is "STRICT"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1495 r1497  
    2424# 
    2525# $Log$ 
     26# Revision 1.50  2004/05/25 05:17:50  jalet 
     27# Now precomputes the job's size only if current printer's enforcement 
     28# is "STRICT" 
     29# 
    2630# Revision 1.49  2004/05/24 22:45:48  jalet 
    2731# New 'enforcement' directive added 
     
    256260             
    257261            # checks the user's quota 
    258             self.softwareJobPrice = userpquota.computeJobPrice(self.softwareJobSize) 
     262            if self.config.getPrinterEnforcement(printer.Name) == "STRICT" : 
     263                self.softwareJobSize = self.precomputeJobSize() 
     264                self.logdebug("Precomputed job's size is : %s pages" % self.softwareJobSize) 
     265                self.softwareJobPrice = userpquota.computeJobPrice(self.softwareJobSize) 
    259266            action = self.warnUserPQuota(userpquota) 
    260267