mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
check supported extensions for rc.autostart generation
This commit is contained in:
parent
c414c7ef63
commit
77b8ed6717
@ -16,9 +16,11 @@ class SourceScanner(object):
|
||||
extensions = tuple(parser.GetSupportedExtensions())
|
||||
for dirname, dirnames, filenames in os.walk(srcdir):
|
||||
for filename in filenames:
|
||||
path = os.path.join(dirname, filename)
|
||||
if not self.ScanFile(path, parser):
|
||||
return False
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension in extensions:
|
||||
path = os.path.join(dirname, filename)
|
||||
if not self.ScanFile(path, parser):
|
||||
return False
|
||||
return True
|
||||
|
||||
def ScanFile(self, path, parser):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user