mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
moveconfig: Use re.fullmatch() to avoid extra check
Simplify the code by using the available function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
78f12e5369
commit
d9c958f49c
1 changed files with 1 additions and 2 deletions
|
@ -1607,8 +1607,7 @@ def defconfig_matches(configs, re_match):
|
|||
bool: True if any CONFIG matches the regex
|
||||
"""
|
||||
for cfg in configs:
|
||||
m_cfg = re_match.match(cfg)
|
||||
if m_cfg and m_cfg.span()[1] == len(cfg):
|
||||
if re_match.fullmatch(cfg):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue