qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 12/28] qapi: Consistently permit any case in downstream prefi


From: Eric Blake
Subject: Re: [PATCH 12/28] qapi: Consistently permit any case in downstream prefixes
Date: Tue, 23 Mar 2021 09:30:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 3/23/21 4:40 AM, Markus Armbruster wrote:
> We require lowercase __RFQDN_ downstream prefixes only where we
> require the prefixed name to be lowercase.  Don't; permit any case in
> __RFQDN_ prefixes anywhere.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  scripts/qapi/expr.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
> index a815060ee2..b5fb0be48b 100644
> --- a/scripts/qapi/expr.py
> +++ b/scripts/qapi/expr.py
> @@ -51,7 +51,7 @@ def check_name_upper(name, info, source):
>  def check_name_lower(name, info, source,
>                       permit_upper=False):
>      stem = check_name_str(name, info, source)
> -    if not permit_upper and name.lower() != name:
> +    if not permit_upper and re.search(r'[A-Z]', stem):
>          raise QAPISemError(
>              info, "%s uses uppercase in name" % source)
>      # TODO reject '_' in stem
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]