[pitivi] Fix a bug in loading xptv files i introduced in 5796420d0da050d3cb268de35346132eee1dae7a.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] Fix a bug in loading xptv files i introduced in 5796420d0da050d3cb268de35346132eee1dae7a.
- Date: Fri, 12 Jun 2009 12:35:01 -0400 (EDT)
commit 5e4f24f132a4ecc89d5dca45e836c5cecffddb69
Author: Alessandro Decina <alessandro d gmail com>
Date: Fri Jun 12 15:48:20 2009 +0200
Fix a bug in loading xptv files i introduced in 5796420d0da050d3cb268de35346132eee1dae7a.
pitivi/formatters/etree.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/formatters/etree.py b/pitivi/formatters/etree.py
index 5f52cdb..1997ebc 100644
--- a/pitivi/formatters/etree.py
+++ b/pitivi/formatters/etree.py
@@ -541,6 +541,8 @@ class ElementTreeFormatter(Formatter):
f.write(tostring(root))
f.close()
+ return True
+
def _loadProject(self, location, project):
self.debug("location:%s, project:%r", location, project)
# open the given location
@@ -598,12 +600,13 @@ class ElementTreeFormatter(Formatter):
old_streams = old_factory.getOutputStreams()
new_streams = {}
for stream_id, old_stream in self._context.streams.iteritems():
- if old_stream not in old_streams:
- continue
-
- new_stream = old_stream_to_new_stream[old_stream]
+ try:
+ new_stream = old_stream_to_new_stream[old_stream]
+ except KeyError:
+ new_stream = old_stream
+ new_streams[stream_id] = new_stream
- self._context.streams.update(new_streams)
+ self._context.streams = new_streams
def _replaceMatchingOldFactory(self, factory, old_factories):
old_factory = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]