scripts: kconfig.py: Simplify write_kconfig_filenames()
The assert has never hit and probably won't be useful. Shorten the code a bit. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
7a531ea22b
commit
7419f4f46f
1 changed files with 3 additions and 9 deletions
|
@ -185,16 +185,10 @@ def write_kconfig_filenames(paths, root_path, output_file_path):
|
|||
# to ensure that different representations of the same path does not end
|
||||
# up with two entries, as that could cause the build system to fail.
|
||||
|
||||
paths_uniq = sorted({os.path.realpath(os.path.join(root_path, path))
|
||||
for path in paths})
|
||||
|
||||
with open(output_file_path, 'w') as out:
|
||||
for path in paths_uniq:
|
||||
# Assert that the file exists, since it was sourced, it
|
||||
# must surely also exist.
|
||||
assert os.path.isfile(path), "Internal error: '{}' does not exist".format(path)
|
||||
|
||||
out.write("{}\n".format(path))
|
||||
for path in sorted({os.path.realpath(os.path.join(root_path, path))
|
||||
for path in paths}):
|
||||
print(path, file=out)
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue