diff options
| author | Philipp Hahn <hahn@univention.de> | 2018-11-20 11:32:23 +0100 |
|---|---|---|
| committer | Jano Tomko <jtomko@redhat.com> | 2020-09-01 13:26:01 +0000 |
| commit | ada1554532a6c8ec1cd90f63bda6ae0ef342f955 (patch) | |
| tree | 827da926f96a9801bf506aa07469fdb18e7be7ce /generator.py | |
| parent | 280b1d66408dd7fe4dcd880a8193e9b30a1b2f9b (diff) | |
| download | libvirt-python-ada1554532a6c8ec1cd90f63bda6ae0ef342f955.tar.gz | |
generator: Directly get dict length
instead of generating a list and then counting the elements.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'generator.py')
| -rwxr-xr-x | generator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generator.py b/generator.py index d0657e1..4c365d6 100755 --- a/generator.py +++ b/generator.py @@ -915,7 +915,7 @@ def buildStubs(module, api_xml): print(api_xml, ":", msg) sys.exit(1) - n = len(list(funcs.keys())) + n = len(funcs) if not quiet: print("Found %d functions in %s" % ((n), api_xml)) @@ -936,7 +936,7 @@ def buildStubs(module, api_xml): if not quiet: # XXX: This is not right, same function already in @functions # will be overwritten. - print("Found %d functions in %s" % ((len(list(funcs.keys())) - n), override_api_xml)) + print("Found %d functions in %s" % (len(funcs) - n, override_api_xml)) nb_wrap = 0 failed = 0 skipped = 0 |
