[pitivi: 7/10] timeline: remove a little list comprehension abuse



commit 9a4c541ff72ea319581195041ad661930adf4057
Author: Alessandro Decina <alessandro d gmail com>
Date:   Fri Sep 24 13:02:38 2010 +0200

    timeline: remove a little list comprehension abuse

 pitivi/timeline/timeline.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 6612fb5..f378631 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1715,8 +1715,12 @@ class Timeline(Signallable, Loggable):
             raise TimelineError()
         input_stream = input_stream[0]
 
-        track = [track for track in self.tracks\
-                if type (track.stream) == type(factory.input_streams[0])][0]
+        track = None
+        for track_ in self.tracks:
+            if type(track_.stream) == type(input_stream):
+                track = track_
+                break
+
         if track is None:
           raise TimelineError("There is no Track to add the effect to")
 



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