Changeset 627

Show
Ignore:
Timestamp:
05/07/05 20:53:15 (20 years ago)
Author:
jerome
Message:

Fix for Python 2.1

Location:
tea4cups/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • tea4cups/trunk/NEWS

    r626 r627  
    2424  * 2.11 : 
    2525   
     26    - Now works with old releases of Python (>= 2.1) 
     27     
    2628    - More powerful error handling at startup time. 
    2729     
  • tea4cups/trunk/README

    r617 r627  
    7474PyKota v1.22alpha2 or higher to avoid a race condition. 
    7575 
     76NB : Tea4CUPS requires a version of Python >= 2.1 
     77 
    7678============================================================================= 
    7779 
  • tea4cups/trunk/tea4cups

    r626 r627  
    284284        branchbasename = "%s_" % branchtype.lower() 
    285285        try : 
    286             globalbranches = [ (k, v) for (k, v) in self.config.items("global") if k.startswith(branchbasename) ] 
     286            # globalbranches = [ (k, v) for (k, v) in self.config.items("global") if k.startswith(branchbasename) ] 
     287            globalbranches = [ (k, self.config.get("global", k)) for k in self.config.options("global") if k.startswith(branchbasename) ] 
    287288        except ConfigParser.NoSectionError, msg :     
    288289            raise ConfigError, "Invalid configuration file : %s" % msg 
    289290        try : 
    290             sectionbranches = [ (k, v) for (k, v) in self.config.items(printqueuename) if k.startswith(branchbasename) ] 
     291            # sectionbranches = [ (k, v) for (k, v) in self.config.items(printqueuename) if k.startswith(branchbasename) ] 
     292            sectionbranches = [ (k, self.config.get(printqueuename, k)) for k in self.config.options(printqueuename) if k.startswith(branchbasename) ] 
    291293        except ConfigParser.NoSectionError, msg :     
    292294            self.logInfo("No section for print queue %s : %s" % (printqueuename, msg))