Esempio n. 1
0
 def _generate_cfg(self, template, output, base_cp, server):
     if sys.version_info < (2,7):
         template_cp = CombinedConfigParser()
     else:
         template_cp = CombinedConfigParser(allow_no_value=True)
     template_cp.read([template])
     template_cp.set_base(base_cp)
     with open(output, "w+") as fp:
         template_cp.dump(server, fp)
Esempio n. 2
0
def _generate_cfg(template, output, base_cp, server):
    template_cp = CombinedConfigParser()
    template_cp.read([template])
    template_cp.set_base(base_cp)
    with open(output, "w+") as fp:
        template_cp.dump(server, fp)