[pitivi] check: Check for Gnonlin availability before getting its version



commit aead1b35dc570952273d21a1338c3375119605b4
Author: Marianne Corvellec <marianne corvellec ens-lyon org>
Date:   Thu Apr 25 21:44:09 2013 -0400

    check: Check for Gnonlin availability before getting its version

 pitivi/check.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/check.py b/pitivi/check.py
index bc4d7bb..69b57ed 100644
--- a/pitivi/check.py
+++ b/pitivi/check.py
@@ -183,9 +183,13 @@ def check_hard_dependencies():
     reg = Gst.Registry.get()
     # Special case: gnonlin is a plugin, not a python module to be imported,
     # we can't use check_dependency to determine the version:
-    inst = Gst.Registry.get().find_plugin("gnonlin").get_version()
-    if _string_to_list(inst) < _string_to_list(HARD_DEPS["gnonlin"]):
+    inst = Gst.Registry.get().find_plugin("gnonlin")
+    if not inst:
         missing_hard_deps["GNonLin"] = (HARD_DEPS["gnonlin"], inst)
+    else:
+        inst = inst.get_version()
+        if _string_to_list(inst) < _string_to_list(HARD_DEPS["gnonlin"]):
+            missing_hard_deps["GNonLin"] = (HARD_DEPS["gnonlin"], inst)
 
     # GES is checked, import and intialize it
     from gi.repository import GES


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