Re: [PATCH libosinfo] examples: avoid PyGIWarning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 29, 2016 at 10:42:35PM +0200, Guido Günther wrote:
> This fixes
> 
> demo.py:3: PyGIWarning: Libosinfo was imported without specifying a version first. Use gi.require_version('Libosinfo', '1.0') before import
> to ensure that the right version gets loaded.
>   from gi.repository import Libosinfo as osinfo;
> ---
>  examples/demo.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/examples/demo.py b/examples/demo.py
> index bdc9b9a..afd3e7c 100755
> --- a/examples/demo.py
> +++ b/examples/demo.py
> @@ -1,5 +1,7 @@
>  #!/usr/bin/python
>  
> +import gi
> +gi.require_version('Libosinfo', '1.0')
>  from gi.repository import Libosinfo as osinfo;
>  
>  loader = osinfo.Loader()

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux