Changeset 2692 for pykota/trunk/pykota/config.py
- Timestamp:
- 02/14/06 16:18:45 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r2635 r2692 439 439 raise PyKotaConfigError, _("Invalid poor man's threshold %s") % pm 440 440 441 def getBalanceZero(self) : 442 """Returns the value of the zero for balance limitation.""" 443 try : 444 bz = self.getGlobalOption("balancezero") 445 except PyKotaConfigError : 446 bz = 0.0 # default value, zero is 0.0 447 try : 448 return float(bz) 449 except (TypeError, ValueError) : 450 raise PyKotaConfigError, _("Invalid balancezero value %s") % bz 451 441 452 def getPoorWarn(self) : 442 453 """Returns the poor man's warning message.""" … … 516 527 # it's a command to run. 517 528 return denyduplicates 529 530 def getDuplicatesDelay(self, printername) : 531 """Returns the number of seconds after which two identical jobs are not considered a duplicate anymore.""" 532 try : 533 duplicatesdelay = self.getPrinterOption(printername, "duplicatesdelay") 534 except PyKotaConfigError : 535 return 0 536 else : 537 try : 538 return int(duplicatesdelay) 539 except (TypeError, ValueError) : 540 raise PyKotaConfigError, _("Incorrect value %s for the duplicatesdelay directive in section %s") % (str(duplicatesdelay), printername) 518 541 519 542 def getWinbindSeparator(self) :