aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/expr.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-08-31 14:38:06 +0200
committerMarkus Armbruster <armbru@redhat.com>2021-09-03 17:09:10 +0200
commit555dd1aaa6b654d0ad62da9660c32835ab493678 (patch)
tree1a5b65bf80991c80446b10af4c711739b17a6236 /scripts/qapi/expr.py
parentd0830ee443f2e27b62c40c9ac2d20b19c399ca4b (diff)
downloadqemu-555dd1aaa6b654d0ad62da9660c32835ab493678.zip
qemu-555dd1aaa6b654d0ad62da9660c32835ab493678.tar.gz
qemu-555dd1aaa6b654d0ad62da9660c32835ab493678.tar.bz2
qapi: Use re.fullmatch() where appropriate
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-10-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'scripts/qapi/expr.py')
-rw-r--r--scripts/qapi/expr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index 019f4c9..9e2aa1d 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -275,7 +275,7 @@ def check_if(expr: _JSONObject, info: QAPISourceInfo, source: str) -> None:
def _check_if(cond: Union[str, object]) -> None:
if isinstance(cond, str):
- if not re.match(r'^[A-Z][A-Z0-9_]*$', cond):
+ if not re.fullmatch(r'[A-Z][A-Z0-9_]*', cond):
raise QAPISemError(
info,
"'if' condition '%s' of %s is not a valid identifier"