Show
Ignore:
Timestamp:
06/04/04 00:12:53 (20 years ago)
Author:
jalet
Message:

Now denies empty jobs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1517 r1519  
    2424# 
    2525# $Log$ 
     26# Revision 1.59  2004/06/03 22:12:53  jalet 
     27# Now denies empty jobs 
     28# 
    2629# Revision 1.58  2004/06/03 21:50:33  jalet 
    2730# Improved error logging. 
     
    340343            os.environ["PYKOTAPHASE"] = "BEFORE" 
    341344             
    342             # checks the user's quota 
     345            # do we want strict or laxist quota enforcement ? 
    343346            if self.config.getPrinterEnforcement(printer.Name) == "STRICT" : 
    344347                self.softwareJobSize = self.precomputeJobSize() 
     
    347350            os.environ["PYKOTAPRECOMPUTEDJOBSIZE"] = str(self.softwareJobSize) 
    348351            os.environ["PYKOTAPRECOMPUTEDJOBPRICE"] = str(self.softwareJobPrice) 
     352             
     353            # checks the user's quota 
    349354            action = self.warnUserPQuota(userpquota) 
     355             
     356            # if no data to pass to real backend, probably a filter 
     357            # higher in the chain failed because of a misconfiguration. 
     358            # we deny the job in this case (nothing to print anyway) 
     359            if not self.jobSizeBytes : 
     360                self.logger.log_message(_("Job contains no data. Printing is denied."), "warn") 
     361                action = "DENY" 
    350362             
    351363            # exports some new environment variables