Changeset 1000 for pykota/trunk/pykota/config.py
- Timestamp:
- 05/28/03 01:00:21 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r980 r1000 21 21 # 22 22 # $Log$ 23 # Revision 1.27 2003/05/27 23:00:21 jalet 24 # Big rewrite of external accounting methods. 25 # Should work well now. 26 # 23 27 # Revision 1.26 2003/04/30 19:53:58 jalet 24 28 # 1.05 … … 205 209 validaccounters = [ "querying", "stupid", "external" ] 206 210 try : 207 fullaccounter = self.getPrinterOption(printer, "accounter").strip() .lower()211 fullaccounter = self.getPrinterOption(printer, "accounter").strip() 208 212 except PyKotaConfigError : 209 213 fullaccounter = "querying" 210 if fullaccounter. startswith("external") :214 if fullaccounter.lower().startswith("external") : 211 215 try : 212 216 (accounter, args) = [x.strip() for x in fullaccounter.split('(', 1)] … … 217 221 if not args : 218 222 raise PyKotaConfigError, _("Invalid external accounter %s for printer %s") % (fullaccounter, printer) 219 return (accounter , args)220 elif fullaccounter not in validaccounters :223 return (accounter.lower(), args) 224 elif fullaccounter.lower() not in validaccounters : 221 225 raise PyKotaConfigError, _("Option accounter in section %s only supports values in %s") % (printer, str(validaccounters)) 222 226 else : 223 return (fullaccounter , None)227 return (fullaccounter.lower(), None) 224 228 225 229 def getRequesterBackend(self, printer) : … … 242 246 raise PyKotaConfigError, _("Invalid requester %s for printer %s") % (fullrequester, printer) 243 247 validrequesters = [ "snmp", "external" ] # TODO : add more requesters 248 requester = requester.lower() 244 249 if requester not in validrequesters : 245 250 raise PyKotaConfigError, _("Option requester for printer %s only supports values in %s") % (printer, str(validrequesters))