mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
buildman: Tidy up common code in parse_file()
Use a function to add to the maintainers database, to avoid duplicating the same code twice. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5df95cf197
commit
a114c61536
1 changed files with 8 additions and 5 deletions
|
@ -345,6 +345,12 @@ class MaintainersDatabase:
|
|||
srcdir (str): Directory containing source code (Kconfig files)
|
||||
fname (str): MAINTAINERS file to be parsed
|
||||
"""
|
||||
def add_targets():
|
||||
"""Add any new targets"""
|
||||
if targets:
|
||||
for target in targets:
|
||||
self.database[target] = (status, maintainers)
|
||||
|
||||
targets = []
|
||||
maintainers = []
|
||||
status = '-'
|
||||
|
@ -382,14 +388,11 @@ class MaintainersDatabase:
|
|||
if match and not rear:
|
||||
targets.append(front)
|
||||
elif line == '\n':
|
||||
for target in targets:
|
||||
self.database[target] = (status, maintainers)
|
||||
add_targets()
|
||||
targets = []
|
||||
maintainers = []
|
||||
status = '-'
|
||||
if targets:
|
||||
for target in targets:
|
||||
self.database[target] = (status, maintainers)
|
||||
add_targets()
|
||||
|
||||
|
||||
class Boards:
|
||||
|
|
Loading…
Reference in a new issue