Show
Ignore:
Timestamp:
02/13/05 23:02:29 (19 years ago)
Author:
jalet
Message:

Big database structure changes. Upgrade script is now included as well as
the new LDAP schema.
Introduction of the -o | --overcharge command line option to edpykota.
The output of repykota is more complete, but doesn't fit in 80 columns anymore.
Introduction of the new 'maxdenybanners' directive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/config.py

    r1968 r2054  
    2222# 
    2323# $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# 
    2431# Revision 1.58  2004/12/02 22:01:58  jalet 
    2532# TLS is now supported with the LDAP backend 
     
    507514            return (mailto, args) 
    508515         
     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             
    509531    def getGraceDelay(self, printername) :     
    510532        """Returns the grace delay in days."""