diff options
author | Philipp Hahn <hahn@univention.de> | 2018-11-20 15:22:23 +0100 |
---|---|---|
committer | Jano Tomko <jtomko@redhat.com> | 2020-09-01 13:26:01 +0000 |
commit | c95a9570849d7c7211f8b31f5354bd18fd811829 (patch) | |
tree | d9101031d01e38efe8c0af057aa4e2e4d6498ad5 /generator.py | |
parent | 9f6638d3b2e5492bd7e0e141d51c9ac0b5c0f0d7 (diff) | |
download | libvirt-python-c95a9570849d7c7211f8b31f5354bd18fd811829.tar.gz |
generator: Simplify loop break
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/generator.py b/generator.py index f2d5f43..a245473 100755 --- a/generator.py +++ b/generator.py @@ -1339,28 +1339,24 @@ def buildWrappers(module): ctypes_processed[type] = () for name, (desc, ret, args, file, mod, cond) in functions.items(): - found = 0 for type in ctypes: classe = classes_type[type][2] if name[0:3] == "vir" and len(args) >= 1 and args[0][1] == type: - found = 1 func = nameFixup(name, classe, type, file) info = (0, func, name, ret, args, file, mod) function_classes[classe].append(info) break elif name[0:3] == "vir" and len(args) >= 2 and args[1][1] == type \ and file != "python_accessor" and name not in function_skip_index_one: - found = 1 func = nameFixup(name, classe, type, file) info = (1, func, name, ret, args, file, mod) function_classes[classe].append(info) break - if found == 1: - continue - func = nameFixup(name, "None", file, file) - info = (0, func, name, ret, args, file, mod) - function_classes['None'].append(info) + else: + func = nameFixup(name, "None", file, file) + info = (0, func, name, ret, args, file, mod) + function_classes['None'].append(info) classes_file = "build/%s.py" % module extra_file = "%s-override.py" % module |