##// END OF EJS Templates
config: remove now-unused support for "includepaths"...
Martin von Zweigbergk -
r45814:3f542427 default
parent child Browse files
Show More
@@ -21,10 +21,9 b' from . import ('
21 21
22 22
23 23 class config(object):
24 def __init__(self, data=None, includepaths=None):
24 def __init__(self, data=None):
25 25 self._data = {}
26 26 self._unset = []
27 self._includepaths = includepaths or []
28 27 if data:
29 28 for k in data._data:
30 29 self._data[k] = data[k].copy()
@@ -162,21 +161,18 b' class config(object):'
162 161
163 162 if m and include:
164 163 expanded = util.expandpath(m.group(1))
165 includepaths = [os.path.dirname(src)] + self._includepaths
166
167 for base in includepaths:
168 inc = os.path.normpath(os.path.join(base, expanded))
169
170 try:
171 include(expanded, inc, remap=remap, sections=sections)
172 break
173 except IOError as inst:
174 if inst.errno != errno.ENOENT:
175 raise error.ParseError(
176 _(b"cannot include %s (%s)")
177 % (inc, encoding.strtolocal(inst.strerror)),
178 b"%s:%d" % (src, line),
179 )
164 inc = os.path.normpath(
165 os.path.join(os.path.dirname(src), expanded)
166 )
167 try:
168 include(expanded, inc, remap=remap, sections=sections)
169 except IOError as inst:
170 if inst.errno != errno.ENOENT:
171 raise error.ParseError(
172 _(b"cannot include %s (%s)")
173 % (inc, encoding.strtolocal(inst.strerror)),
174 b"%s:%d" % (src, line),
175 )
180 176 continue
181 177 if emptyre.match(l):
182 178 continue
General Comments 0
You need to be logged in to leave comments. Login now