[gvfs] tests: Explicitly require version for GUMockdev to avoid warning



commit 6d773947fab53a2a29cc43a38dab86754a8963fa
Author: Ondrej Holy <oholy redhat com>
Date:   Tue May 24 12:16:13 2016 +0200

    tests: Explicitly require version for GUMockdev to avoid warning
    
    This avoids the following deprecation warning:
    PyGIWarning: UMockdev was imported without specifying a version first.

 test/gvfs-test |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 1d299d7..8a4ada1 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -38,6 +38,8 @@ from glob import glob
 from gi.repository import GLib, Gio
 
 try:
+    import gi
+    gi.require_version('UMockdev', '1.0')
     from gi.repository import UMockdev
     have_umockdev = subprocess.call(['which', 'umockdev-wrapper'], stdout=subprocess.PIPE) == 0
     # needs >= 0.2.10


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