forked from Archive/PX4-Autopilot
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:
parent
64d43ad381
commit
1c94e27463
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue