[pitivi] Revert "bin: Check dependencies before initializing them"



commit 5d2278e25c157d4e5e1982a0a2b3d70e7c4cef1b
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Aug 17 00:05:04 2015 +0200

    Revert "bin: Check dependencies before initializing them"
    
    This reverts commit 59f9eb0e7981a167bf2e26472769336ed0aafb14.
    
    This commit leaded to:
    
      raise NotInitialized("Please call Gst.init(argv)
          before using GStreamer")
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753564

 bin/pitivi.in |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/bin/pitivi.in b/bin/pitivi.in
index d1fe793..6d94d87 100644
--- a/bin/pitivi.in
+++ b/bin/pitivi.in
@@ -52,7 +52,8 @@ else:
 
 
 def _prepend_env_path(name, value):
-    os.environ[name] = os.pathsep.join(value + os.environ.get(name, "").split(os.pathsep))
+    os.environ[name] = os.pathsep.join(value +
+            os.environ.get(name, "").split(os.pathsep))
 
 
 def jump_through_hoops():
@@ -76,7 +77,7 @@ def _add_pitivi_path():
         root = os.path.join(LIBDIR, 'pitivi', 'python')
         localedir = os.path.join(DATADIR, "locale")
 
-    if root not in sys.path:
+    if not root in sys.path:
         sys.path.append(root)
 
     # prepend any directories found at configure time if they're not
@@ -119,7 +120,7 @@ def _initialize_modules():
     try:
         initialize_modules()
     except Exception as e:
-        print("Failed to initialize modules: %s" % e)
+        print("Failed to initialize modules")
         raise
 
 def _check_requirements():
@@ -138,11 +139,11 @@ def _run_pitivi():
 
 if __name__ == "__main__":
     _add_pitivi_path()
+    _initialize_modules()
     # Dep checks really have to happen here, not in application.py. Otherwise,
     # as soon as application.py starts, it will try importing all the code and
     # the classes in application.py will not even have the opportunity to run.
     # We do these checks on every startup (even outside the dev environment, for
     # soft deps); doing imports and gst registry checks has near-zero cost.
     _check_requirements()
-    _initialize_modules()
     _run_pitivi()


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