Show
Ignore:
Timestamp:
11/13/05 23:37:22 (18 years ago)
Author:
jerome
Message:

Preliminary work on the "onbackenderror" directive.

Files:
1 modified

Legend:

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

    r2422 r2583  
    268268            return enforcement     
    269269             
     270    def getPrinterOnBackendError(self, printername) :     
     271        """Returns what must be done whenever the real CUPS backend fails.""" 
     272        validactions = [ "CHARGE", "NOCHARGE" ]      
     273        try : 
     274            action = self.getPrinterOption(printername, "onbackenderror") 
     275        except PyKotaConfigError :     
     276            return "NOCHARGE" 
     277        else :     
     278            action = action.upper() 
     279            if action not in validactions : 
     280                raise PyKotaConfigError, _("Option onbackenderror in section %s only supports values in %s") % (printername, str(validactions)) 
     281            return action   
     282             
    270283    def getPrinterOnAccounterError(self, printername) :     
    271284        """Returns what must be done whenever the accounter fails."""