[pitivi] elements: remove check for too generic "AttributeError".



commit 4451fc22faffaebb694690af304642b8dfd7b76a
Author: Mathieu Duponchelle <mduponchelle1 gmail com>
Date:   Thu Jan 23 19:22:13 2014 +0100

    elements: remove check for too generic "AttributeError".
    
    It was shadowing errors further down the stack.

 pitivi/timeline/elements.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index a32e657..ada77c5 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -1141,11 +1141,8 @@ class URISourceElement(TimelineElement):
             self._context.finish()
 
     def cleanup(self):
-        if self.preview:
-            try:
-                self.preview.cleanup()
-            except AttributeError:  # preview was just an actor.
-                pass
+        if self.preview and not type(self.preview) is Clutter.Actor:
+            self.preview.cleanup()
         self.leftHandle.cleanup()
         self.leftHandle = None
         self.rightHandle.cleanup()


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