Show
Ignore:
Timestamp:
11/26/03 20:17:35 (20 years ago)
Author:
jalet
Message:

Printing on a printer not present in the Quota Storage now results
in the job being stopped or cancelled depending on the system.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykota

    r1205 r1221  
    2424# 
    2525# $Log$ 
     26# Revision 1.47  2003/11/26 19:17:35  jalet 
     27# Printing on a printer not present in the Quota Storage now results 
     28# in the job being stopped or cancelled depending on the system. 
     29# 
    2630# Revision 1.46  2003/11/24 14:25:02  jalet 
    2731# Missing import in pykota filter 
     
    231235    printer = thefilter.storage.getPrinter(thefilter.printername) 
    232236    if not printer.Exists : 
    233         # The printer is unknown from the Quota Storage perspective 
    234         # we let the job pass through, but log a warning message 
    235         thefilter.logger.log_message(_("Printer %s not registered in the PyKota system") % thefilter.printername, "warn") 
     237        # The printer is unknown from the Quota Storage perspective. 
     238        # we just cancel the job. 
     239        thefilter.logger.log_message(_("Printer %s not registered in the PyKota system") % thefilter.printername, "error") 
     240        return thefilter.removeJob() 
    236241    else :     
    237242        for dummy in range(2) : 
     
    279284            return thefilter.removeJob() 
    280285         
    281     # pass the job untouched to the underlying layer 
    282     thefilter.accounter.filterInput(thefilter.inputfile)       
     286        # pass the job untouched to the underlying layer 
     287        thefilter.accounter.filterInput(thefilter.inputfile)       
    283288     
    284     return thefilter.acceptJob() 
     289        return thefilter.acceptJob() 
    285290 
    286291if __name__ == "__main__" :