Changeset 2054 for pykota/trunk/pykota/config.py
- Timestamp:
- 02/13/05 23:02:29 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r1968 r2054 22 22 # 23 23 # $Log$ 24 # Revision 1.59 2005/02/13 22:02:29 jalet 25 # Big database structure changes. Upgrade script is now included as well as 26 # the new LDAP schema. 27 # Introduction of the -o | --overcharge command line option to edpykota. 28 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 29 # Introduction of the new 'maxdenybanners' directive. 30 # 24 31 # Revision 1.58 2004/12/02 22:01:58 jalet 25 32 # TLS is now supported with the LDAP backend … … 507 514 return (mailto, args) 508 515 516 def getMaxDenyBanners(self, printername) : 517 """Returns the maximum number of deny banners to be printed for a particular user on a particular printer.""" 518 try : 519 maxdb = self.getPrinterOption(printername, "maxdenybanners") 520 except PyKotaConfigError : 521 return 0 # default value is to forbid printing a deny banner. 522 try : 523 value = int(maxdb.strip()) 524 if value < 0 : 525 raise ValueError 526 except (TypeError, ValueError) : 527 raise PyKotaConfigError, _("Invalid maximal deny banners counter %s") % maxdb 528 else : 529 return value 530 509 531 def getGraceDelay(self, printername) : 510 532 """Returns the grace delay in days."""