diff options
| author | Philipp Hahn <hahn@univention.de> | 2018-11-20 10:11:25 +0100 |
|---|---|---|
| committer | Jano Tomko <jtomko@redhat.com> | 2020-09-01 13:26:01 +0000 |
| commit | 2679b06d9ce5eccb6aeb8ff3c8a0c197db4c71d7 (patch) | |
| tree | ce8b6252d12411fb96c3b209a4e61bc6ae656d03 | |
| parent | 241e89b71386c403abac66606f00bb6b11e6d8e9 (diff) | |
| download | libvirt-python-2679b06d9ce5eccb6aeb8ff3c8a0c197db4c71d7.tar.gz | |
generator: Fix return type on failure
to return a negative value instead of None for consistency.
Signed-off-by: Philipp Hahn <hahn@univention.de>
| -rwxr-xr-x | generator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generator.py b/generator.py index 6d9248a..566201f 100755 --- a/generator.py +++ b/generator.py @@ -698,7 +698,7 @@ def print_function_wrapper(module, name, output, export, include): (desc, ret, args, file, mod, cond) = qemu_functions[name] except Exception: print("failed to get function %s infos" % name) - return + return -1 if module == "libvirt": if name in skip_function: @@ -905,7 +905,7 @@ def buildStubs(module, api_xml): if module not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]: print("ERROR: Unknown module type: %s" % module) - return None + return -1 if module == "libvirt": funcs = functions |
