mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01: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
@ -1607,8 +1607,7 @@ def defconfig_matches(configs, re_match):
|
|||||||
bool: True if any CONFIG matches the regex
|
bool: True if any CONFIG matches the regex
|
||||||
"""
|
"""
|
||||||
for cfg in configs:
|
for cfg in configs:
|
||||||
m_cfg = re_match.match(cfg)
|
if re_match.fullmatch(cfg):
|
||||||
if m_cfg and m_cfg.span()[1] == len(cfg):
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user