Show
Ignore:
Timestamp:
05/13/04 15:59:30 (20 years ago)
Author:
jalet
Message:

Code simplifications

Files:
1 modified

Legend:

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

    r1371 r1475  
    2222# 
    2323# $Log$ 
     24# Revision 1.46  2004/05/13 13:59:28  jalet 
     25# Code simplifications 
     26# 
    2427# Revision 1.45  2004/03/01 10:22:30  jalet 
    2528# Can now extract per printer pre and post hooks from the configuration file 
     
    303306        """Returns the accounter backend to use for a given printer. 
    304307         
    305            if it is not set, it defaults to 'querying' which means ask printer 
     308           if it is not set, it defaults to 'hardware' which means ask printer 
    306309           for its internal lifetime page counter. 
    307310        """    
    308         validaccounters = [ "querying", "stupid", "external" ]      
     311        validaccounters = [ "hardware", "software" ]      
    309312        fullaccounter = self.getPrinterOption(printername, "accounter").strip() 
    310         if fullaccounter.lower().startswith("external") :     
     313        if fullaccounter.lower().startswith("software") :     
    311314            try : 
    312315                (accounter, args) = [x.strip() for x in fullaccounter.split('(', 1)] 
     
    343346        except PyKotaConfigError :     
    344347            # No requester defined, maybe it is not needed if accounting method 
    345             # is not set to 'querying', but if we are called, then the accounting 
    346             # method really IS 'querying', and so there's a big problem. 
     348            # is not set to 'hardware', but if we are called, then the accounting 
     349            # method really IS 'hardware', and so there's a big problem. 
    347350            raise PyKotaConfigError, _("Option requester for printer %s was not set") % printername 
    348351        else :     
     
    355358            if not args : 
    356359                raise PyKotaConfigError, _("Invalid requester %s for printer %s") % (fullrequester, printername) 
    357             validrequesters = [ "snmp", "external" ] # TODO : add more requesters 
     360            validrequesters = [ "external" ]  
    358361            requester = requester.lower() 
    359362            if requester not in validrequesters :