Changeset 1687 for pykota/trunk/pykota/config.py
- Timestamp:
- 09/01/04 01:29:53 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r1646 r1687 22 22 # 23 23 # $Log$ 24 # Revision 1.51 2004/08/31 23:29:53 jalet 25 # Introduction of the new 'onaccountererror' configuration directive. 26 # Small fix for software accounter's return code which can't be None anymore. 27 # Make software and hardware accounting code look similar : will be factorized 28 # later. 29 # 24 30 # Revision 1.50 2004/07/27 07:07:27 jalet 25 31 # Typo : treshold ==> threshold … … 366 372 return enforcement 367 373 374 def getPrinterOnAccounterError(self, printername) : 375 """Returns what must be done whenever the accounter fails.""" 376 validactions = [ "CONTINUE", "STOP" ] 377 try : 378 action = self.getPrinterOption(printername, "onaccountererror") 379 except PyKotaConfigError : 380 return "STOP" 381 else : 382 action = action.upper() 383 if action not in validactions : 384 raise PyKotaConfigError, _("Option onaccountererror in section %s only supports values in %s") % (printername, str(validactions)) 385 return action 386 368 387 def getPrinterPolicy(self, printername) : 369 388 """Returns the default policy for the current printer."""