Re: [libvirt-sandbox PATCH] Silence PyGIWarnings

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

 



On Fri, Mar 18, 2016 at 06:32:21PM +0100, Guido Günther wrote:
> This fixes
> 
> /usr/bin/virt-sandbox-service:22: PyGIWarning: LibvirtGObject was imported without specifying a version first. Use gi.require_version('LibvirtGObject', '1.0') before import to ensure that the right version gets loaded.
>   from gi.repository import LibvirtGObject
> /usr/bin/virt-sandbox-service:23: PyGIWarning: LibvirtSandbox was imported without specifying a version first. Use gi.require_version('LibvirtSandbox', '1.0') before import to ensure that the right version gets loaded.
>   from gi.repository import LibvirtSandbox
> ---
>  bin/virt-sandbox-service | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
> index a4a2154..45f4517 100755
> --- a/bin/virt-sandbox-service
> +++ b/bin/virt-sandbox-service
> @@ -19,7 +19,10 @@
>  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>  #
>  
> +import gi
> +gi.require_version('LibvirtGObject', '1.0')
>  from gi.repository import LibvirtGObject
> +gi.require_version('LibvirtSandbox', '1.0')
>  from gi.repository import LibvirtSandbox
>  from gi.repository import GLib
>  import gi

ACK


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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




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