aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-05 20:18:54 -0700
committerSimon Glass <sjg@chromium.org>2022-03-18 19:24:24 -0600
commitd9c958f49c3dd78b3844514fdb8add3cb0793c54 (patch)
tree1114fe35c3550ad78bfceadf72f176de1b96e809 /tools
parent78f12e53696f937afe5a894912c4c6c576b9010e (diff)
downloadu-boot-d9c958f49c3dd78b3844514fdb8add3cb0793c54.zip
u-boot-d9c958f49c3dd78b3844514fdb8add3cb0793c54.tar.gz
u-boot-d9c958f49c3dd78b3844514fdb8add3cb0793c54.tar.bz2
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/moveconfig.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index ecc6e16..84bc875 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -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