mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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>
This commit is contained in:
parent
d0830ee443
commit
555dd1aaa6
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue