예제 #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)
예제 #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)
예제 #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()
예제 #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()