mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user