Ejemplo n.º 1
0
 def expandoption(self,option,optionvalue,section,buildout,dictlist):
     """expand section with variables"""
     newoption = self.expandvar(option,dictlist[0])
     if not buildout.has_section(section):
         buildout.add_section(section)
     newopts = []
     for line in dictlist:
         #import pdb; pdb.set_trace()
         newopt = self.expandvar(optionvalue, line)
         if newopt not in newopts:
             newopts.append(newopt)
     newoptionvalue = '\n\t'.join(newopts)
     buildout.set(section, newoption, newoptionvalue)
     return buildout
Ejemplo n.º 2
0
 def expandoption(self, option, optionvalue, section, buildout, dictlist):
     """expand section with variables"""
     newoption = self.expandvar(option, dictlist[0])
     if not buildout.has_section(section):
         buildout.add_section(section)
     newopts = []
     for line in dictlist:
         #import pdb; pdb.set_trace()
         newopt = self.expandvar(optionvalue, line)
         if newopt not in newopts:
             newopts.append(newopt)
     newoptionvalue = '\n\t'.join(newopts)
     buildout.set(section, newoption, newoptionvalue)
     return buildout
Ejemplo n.º 3
0
 def expandsection(self,section,config,buildout,keylist,dictlist):
     """expand section with variables"""
     newsection = self.expandvar(section,dictlist[0])
     if not buildout.has_section(newsection):
         buildout.add_section(newsection)
     for option in config.options(section):
         #import pdb; pdb.set_trace()
         opt = config.get(section, option)
         match = self.c_re.search(option)
         if match: #option name contains a variable
             newkeys = self.checkkey(option)
             keydict = self.multikeydict(newkeys,dictlist)
             for key in keydict.keys():
                 buildout = self.expandoption(option,opt,newsection,buildout,keydict[key])
         else:#eventually right-part contains a variable
             buildout = self.expandoption(option,opt,newsection,buildout,dictlist)
     return buildout
Ejemplo n.º 4
0
 def expandsection(self,section,config,buildout,keylist,dictlist):
     """expand section with variables"""
     newsection = self.expandvar(section,dictlist[0])
     if not buildout.has_section(newsection):
         buildout.add_section(newsection)
     for option in config.options(section):
         #import pdb; pdb.set_trace()
         opt = config.get(section, option)
         match = self.c_re.search(option)
         if match: #option name contains a variable
             newkeys = self.checkkey(option)
             keydict = self.multikeydict(newkeys,dictlist)
             for key in keydict.keys():
                 buildout = self.expandoption(option,opt,newsection,buildout,keydict[key])
         else:#eventually right-part contains a variable
             buildout = self.expandoption(option,opt,newsection,buildout,dictlist)
     return buildout