On 3/23/21 5: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 <arm...@redhat.com>
Reviewed-by: John Snow <js...@redhat.com>
---
scripts/qapi/expr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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