[pitivi: 7/10] timeline: remove a little list comprehension abuse
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 7/10] timeline: remove a little list comprehension abuse
- Date: Sun, 26 Sep 2010 07:45:05 +0000 (UTC)
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]