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

[virt-tools-list] [PATCH 1/3] Fix exception with older gi versions



The method gi.check_version was defined in 3.3.5.  Prevent an exception
with older versions of the library.
---
 src/virtManager/manager.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py
index 991bcd7..7ca0861 100644
--- a/src/virtManager/manager.py
+++ b/src/virtManager/manager.py
@@ -65,7 +65,7 @@ try:
     import gi
     gi.check_version("3.7.4")
     can_set_row_none = True
-except ValueError:
+except (ValueError, AttributeError):
     can_set_row_none = False
 
 
-- 
1.7.10.4


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