diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-08-31 14:38:06 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-09-03 17:09:10 +0200 |
commit | 555dd1aaa6b654d0ad62da9660c32835ab493678 (patch) | |
tree | 1a5b65bf80991c80446b10af4c711739b17a6236 /scripts | |
parent | d0830ee443f2e27b62c40c9ac2d20b19c399ca4b (diff) |
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')
-rw-r--r-- | scripts/qapi/expr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py index 019f4c97aa..9e2aa1d43a 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" |