Changeset 1475 for pykota/trunk/pykota/config.py
- Timestamp:
- 05/13/04 15:59:30 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r1371 r1475 22 22 # 23 23 # $Log$ 24 # Revision 1.46 2004/05/13 13:59:28 jalet 25 # Code simplifications 26 # 24 27 # Revision 1.45 2004/03/01 10:22:30 jalet 25 28 # Can now extract per printer pre and post hooks from the configuration file … … 303 306 """Returns the accounter backend to use for a given printer. 304 307 305 if it is not set, it defaults to ' querying' which means ask printer308 if it is not set, it defaults to 'hardware' which means ask printer 306 309 for its internal lifetime page counter. 307 310 """ 308 validaccounters = [ " querying", "stupid", "external" ]311 validaccounters = [ "hardware", "software" ] 309 312 fullaccounter = self.getPrinterOption(printername, "accounter").strip() 310 if fullaccounter.lower().startswith(" external") :313 if fullaccounter.lower().startswith("software") : 311 314 try : 312 315 (accounter, args) = [x.strip() for x in fullaccounter.split('(', 1)] … … 343 346 except PyKotaConfigError : 344 347 # No requester defined, maybe it is not needed if accounting method 345 # is not set to ' querying', but if we are called, then the accounting346 # 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. 347 350 raise PyKotaConfigError, _("Option requester for printer %s was not set") % printername 348 351 else : … … 355 358 if not args : 356 359 raise PyKotaConfigError, _("Invalid requester %s for printer %s") % (fullrequester, printername) 357 validrequesters = [ " snmp", "external" ] # TODO : add more requesters360 validrequesters = [ "external" ] 358 361 requester = requester.lower() 359 362 if requester not in validrequesters :