Ejemplo n.º 1
0
 def run(self):        
     self.parse_options()
     
     configfile=self.opt.conf
     multiconfig = HaizeaMultiConfig.from_file(configfile)
             
     try:
         from mako.template import Template
     except Exception, e:
         print "You need Mako Templates for Python to run this command."
         print "You can download them at http://www.makotemplates.org/"
         exit(1)
Ejemplo n.º 2
0
    def run(self):
        self.parse_options()

        configfile = self.opt.conf
        multiconfig = HaizeaMultiConfig.from_file(configfile)

        try:
            from mako.template import Template
        except Exception, e:
            print "You need Mako Templates for Python to run this command."
            print "You can download them at http://www.makotemplates.org/"
            exit(1)
Ejemplo n.º 3
0
 def run(self):    
     self.parse_options()
     
     configfile=self.opt.conf
     multiconfig = HaizeaMultiConfig.from_file(configfile)
     
     etcdir = self.opt.dir
     
     configs = multiconfig.get_configs()
     
     etcdir = os.path.abspath(etcdir)    
     if not os.path.exists(etcdir):
         os.makedirs(etcdir)
         
     for c in configs:
         profile = c.get_attr("profile")
         tracefile = c.get("tracefile")
         injfile = c.get("injectionfile")
         configname = generate_config_name(profile, tracefile, injfile)
         configfile = etcdir + "/%s.conf" % configname
         fc = open(configfile, "w")
         c.config.write(fc)
         fc.close()
Ejemplo n.º 4
0
    def run(self):
        self.parse_options()

        configfile = self.opt.conf
        multiconfig = HaizeaMultiConfig.from_file(configfile)

        etcdir = self.opt.dir

        configs = multiconfig.get_configs()

        etcdir = os.path.abspath(etcdir)
        if not os.path.exists(etcdir):
            os.makedirs(etcdir)

        for c in configs:
            profile = c.get_attr("profile")
            tracefile = c.get("tracefile")
            injfile = c.get("injectionfile")
            configname = generate_config_name(profile, tracefile, injfile)
            configfile = etcdir + "/%s.conf" % configname
            fc = open(configfile, "w")
            c.config.write(fc)
            fc.close()