summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/expr.py
diff options
context:
space:
mode:
authorMarkus Armbruster2020-03-04 16:59:32 +0100
committerMarkus Armbruster2020-03-05 09:24:11 +0100
commit8ec0e1a4e68781f1e512af47fd6ab46ec76326e8 (patch)
tree4d41ab70f82f04c28689e62b26ff0d0763b16bb8 /scripts/qapi/expr.py
parentqapi: Use super() now we have Python 3 (diff)
downloadqemu-8ec0e1a4e68781f1e512af47fd6ab46ec76326e8.tar.gz
qemu-8ec0e1a4e68781f1e512af47fd6ab46ec76326e8.tar.xz
qemu-8ec0e1a4e68781f1e512af47fd6ab46ec76326e8.zip
qapi: Brush off some (py)lint
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-5-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'scripts/qapi/expr.py')
-rw-r--r--scripts/qapi/expr.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index d7a289eded..fecf466fa7 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -35,7 +35,6 @@ def check_name_is_str(name, info, source):
def check_name_str(name, info, source,
allow_optional=False, enum_member=False,
permit_upper=False):
- global valid_name
membername = name
if allow_optional and name.startswith('*'):
@@ -249,7 +248,7 @@ def check_union(expr, info):
def check_alternate(expr, info):
members = expr['data']
- if len(members) == 0:
+ if not members:
raise QAPISemError(info, "'data' must not be empty")
for (key, value) in members.items():
source = "'data' member '%s'" % key