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