Bugfix:#3167 Nested parameter files under xxxx/yyyy/zzzz/kkkk are considered in the scope of xxxx/yyyy

Conflicts:
	src/lib/ecl
This commit is contained in:
David Sidrane 2015-11-10 09:16:48 -10:00 committed by Lorenz Meier
parent 64d43ad381
commit 1c94e27463
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ class Scope(object):
"""
Single parameter group
"""
re_deep_lines = re.compile(r'.*\/.*\/')
def __init__(self, ):
self.scope = set()
@ -27,7 +28,12 @@ class Scope(object):
"""
if len(self.scope) == 0:
return True
# Anything in the form xxxxx/yyyyy/zzzzz....
# is treated as xxxxx/yyyyy
while (self.re_deep_lines.match(scope)):
scope = os.path.dirname(scope)
return scope in self.scope
class CMakeParser(object):