[libvirt] [PATCH python 04/15] generator: Cast iterators to a list() explicitly

Eric Blake eblake at redhat.com
Tue Dec 3 17:16:28 UTC 2013


On 12/03/2013 09:36 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> In python3 various methods list 'dict.keys()' do not
> return a list, so we must explicitly cast the result.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  generator.py | 40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/generator.py b/generator.py
> index 23bae9a..ce2797e 100755
> --- a/generator.py
> +++ b/generator.py
> @@ -603,7 +603,7 @@ def print_function_wrapper(module, name, output, export, include):
>          print("failed to get function %s infos" % name)
>          return
>  
> -    if skipped_modules.has_key(module):
> +    if module in skipped_modules:
>          return 0

This hunk belongs in 5/15

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131203/485265a3/attachment-0001.sig>


More information about the libvir-list mailing list