Show
Ignore:
Timestamp:
10/04/06 00:21:34 (18 years ago)
Author:
jerome
Message:

Added the 'noprintingmaxdelay' directive to workaround printers
which don't conform to RFC3805.
Improved the reliability of SNMP and PJL hardware accounting.
PJL still needs some work though...

Files:
1 modified

Legend:

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

    r2909 r3025  
    557557                raise PyKotaConfigError, _("Incorrect value %s for the duplicatesdelay directive in section %s") % (str(duplicatesdelay), printername) 
    558558         
     559    def getNoPrintingMaxDelay(self, printername) :           
     560        """Returns the max number of seconds to wait for the printer to be in 'printing' mode.""" 
     561        try :  
     562            maxdelay = self.getPrinterOption(printername, "noprintingmaxdelay") 
     563        except PyKotaConfigError :     
     564            return None         # tells to use hardcoded value 
     565        else :     
     566            try : 
     567                maxdelay = int(maxdelay) 
     568                if maxdelay < 0 : 
     569                    raise ValueError 
     570            except (TypeError, ValueError) : 
     571                raise PyKotaConfigError, _("Incorrect value %s for the noprintingmaxdelay directive in section %s") % (str(maxdelay), printername) 
     572            else :     
     573                return maxdelay 
     574         
    559575    def getWinbindSeparator(self) :           
    560576        """Returns the winbind separator's value if it is set, else None."""