[pitivi] project: Handle exception when extracting a timeline from a project



commit 276baf8d58b1d232b44d4671c239bb9a3b69a6cf
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Jun 1 17:58:54 2015 +0200

    project: Handle exception when extracting a timeline from a project
    
    That will happen anytime the format is not supported

 pitivi/project.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 9da0cbd..3cb29be 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -1110,7 +1110,11 @@ class Project(Loggable, GES.Project):
         Load the project.
         """
         # In this extract call the project is loaded from the file.
-        self.timeline = self.extract()
+        try:
+            self.timeline = self.extract()
+        except GLib.Error:
+            self.timeline = None
+
         if self.timeline is None:
             return False
 


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