MCPcopy Create free account
hub / github.com/apache/httpd / _make_conf

Method _make_conf

test/pyhttpd/env.py:105–121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103 os.makedirs(self.env.server_logs_dir)
104
105 def _make_conf(self):
106 # remove anything from another run/test suite
107 conf_dest_dir = os.path.join(self.env.server_dir, 'conf')
108 if os.path.isdir(conf_dest_dir):
109 shutil.rmtree(conf_dest_dir)
110 for d in self._source_dirs:
111 conf_src_dir = os.path.join(d, 'conf')
112 if os.path.isdir(conf_src_dir):
113 if not os.path.exists(conf_dest_dir):
114 os.makedirs(conf_dest_dir)
115 for name in os.listdir(conf_src_dir):
116 src_path = os.path.join(conf_src_dir, name)
117 m = re.match(r'(.+).template', name)
118 if m:
119 self._make_template(src_path, os.path.join(conf_dest_dir, m.group(1)))
120 elif os.path.isfile(src_path):
121 shutil.copy(src_path, os.path.join(conf_dest_dir, name))
122
123 def _make_template(self, src, dest):
124 var_map = dict()

Callers 1

makeMethod · 0.95

Calls 2

_make_templateMethod · 0.95
joinMethod · 0.80

Tested by

no test coverage detected