Show
Ignore:
Timestamp:
02/06/03 10:19:02 (22 years ago)
Author:
jalet
Message:

More robust behavior (hopefully) when the user or printer is not managed
correctly by the Quota System : e.g. cupsFilter added in ppd file, but
printer and/or user not 'yet?' in storage.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/config.py

    r708 r713  
    1515# 
    1616# $Log$ 
     17# Revision 1.4  2003/02/06 09:19:02  jalet 
     18# More robust behavior (hopefully) when the user or printer is not managed 
     19# correctly by the Quota System : e.g. cupsFilter added in ppd file, but 
     20# printer and/or user not 'yet?' in storage. 
     21# 
    1722# Revision 1.3  2003/02/05 23:26:22  jalet 
    1823# Incorrect handling of grace delay 
     
    7782                    raise PyKotaConfigError, "Option %s not found in section %s of %s" % (option, printer, self.filename) 
    7883                     
    79             validpolicies = [ "accept", "deny" ]      
    80             if self.config.get(printer, "policy").lower() not in validpolicies : 
     84            validpolicies = [ "ALLOW", "DENY" ]      
     85            if self.config.get(printer, "policy").upper() not in validpolicies : 
    8186                raise PyKotaConfigError, "Option policy in section %s only supports values in %s" % (printer, str(validrequesters)) 
    8287             
     
    119124    def getPrinterPolicy(self, printer) :     
    120125        """Returns the default policy for the current printer.""" 
    121         return self.config.get(printer, "policy").lower() 
     126        return self.config.get(printer, "policy").upper() 
    122127         
    123128    def getSMTPServer(self) :