mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
moveconfig: Remove remove_defconfig()
This is not necessary if simpler code is used. Use the split function and drop the unnecessary [] Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
6101253818
commit
78f12e5369
1 changed files with 1 additions and 12 deletions
|
@ -94,17 +94,6 @@ SIZES = {
|
|||
RE_REMOVE_DEFCONFIG = re.compile(r'(.*)_defconfig')
|
||||
|
||||
### helper functions ###
|
||||
def remove_defconfig(defc):
|
||||
"""Drop the _defconfig suffix on a string
|
||||
|
||||
Args:
|
||||
defc (str): String to convert
|
||||
|
||||
Returns:
|
||||
str: string with the '_defconfig' suffix removed
|
||||
"""
|
||||
return RE_REMOVE_DEFCONFIG.match(defc)[1]
|
||||
|
||||
def check_top_directory():
|
||||
"""Exit if we are not at the top of source directory."""
|
||||
for fname in 'README', 'Licenses':
|
||||
|
@ -1668,7 +1657,7 @@ def do_find_config(config_list):
|
|||
print(f"Error: Not in Kconfig: %s" % ' '.join(adhoc))
|
||||
else:
|
||||
print(f'{len(out)} matches')
|
||||
print(' '.join([remove_defconfig(item) for item in out]))
|
||||
print(' '.join(item.split('_defconfig')[0] for item in out))
|
||||
|
||||
|
||||
def prefix_config(cfg):
|
||||
|
|
Loading…
Reference in a new issue