[gvfs] test: Do not fail if umockdev is not installed



commit c38eada54168ec303fce76f3ec545c013485d592
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Jun 2 10:54:36 2016 +0200

    test: Do not fail if umockdev is not installed
    
    Change introduced by commit 6d77394 results in ValueError exception if
    umockdev is not installed. This exception is not handled and thus the
    test is unexpectedly terminated. Handle this exception and set have_umockdev
    accordingly.

 test/gvfs-test |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 041bdfb..fbaebbc 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -44,7 +44,7 @@ try:
     have_umockdev = subprocess.call(['which', 'umockdev-wrapper'], stdout=subprocess.PIPE) == 0
     # needs >= 0.2.10
     have_umockdev = have_umockdev and hasattr(UMockdev.Testbed, 'add_from_file')
-except ImportError:
+except (ValueError, ImportError):
     have_umockdev = False
 
 # umockdev environment for gphoto/MTP tests


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