[Pkg-libvirt-commits] [libvirt-sandbox] 01/42: Silence PyGIWarnings

Guido Guenther agx at moszumanska.debian.org
Sat May 27 16:27:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to branch debian/experimental
in repository libvirt-sandbox.

commit 6679777b0fbc21b660ce62e9a7d2ac8b0865a223
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Mar 18 18:10:42 2016 +0100

    Silence PyGIWarnings
    
    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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt-sandbox.git



More information about the Pkg-libvirt-commits mailing list