Changeset 3034

Show
Ignore:
Timestamp:
10/12/06 23:21:48 (18 years ago)
Author:
jerome
Message:

Can now compute ink usage, but does not use it yet to compute price.

Location:
pykota/trunk/pykota
Files:
1 added
1 modified

Legend:

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

    r3031 r3034  
    192192    def getPreAccounterBackend(self, printername) :     
    193193        """Returns the preaccounter backend to use for a given printer.""" 
    194         validaccounters = [ "software", "bw", "cmyk", "cmy", "rgb" ]      
     194        validaccounters = [ "software", "ink" ]      
    195195        try : 
    196196            fullaccounter = self.getPrinterOption(printername, "preaccounter").strip() 
     
    207207                    if args.endswith(')') : 
    208208                        args = args[:-1].strip() 
     209                    if (vac == "ink") and not args :     
     210                        raise PyKotaConfigError, _("Invalid preaccounter %s for printer %s") % (fullaccounter, printername) 
    209211                    return (vac, args) 
    210212            raise PyKotaConfigError, _("Option preaccounter in section %s only supports values in %s") % (printername, str(validaccounters)) 
     
    212214    def getAccounterBackend(self, printername) :     
    213215        """Returns the accounter backend to use for a given printer.""" 
    214         validaccounters = [ "hardware", "software", "bw", "cmyk", "cmy", "rgb" ]      
     216        validaccounters = [ "hardware", "software", "ink" ]      
    215217        try : 
    216218            fullaccounter = self.getPrinterOption(printername, "accounter").strip() 
     
    227229                    if args.endswith(')') : 
    228230                        args = args[:-1].strip() 
    229                     if (accounter == "hardware") and not args : 
     231                    if (vac in ("hardware", "ink")) and not args : 
    230232                        raise PyKotaConfigError, _("Invalid accounter %s for printer %s") % (fullaccounter, printername) 
    231233                    return (vac, args)