[pitivi] ui: Do not crash when trying to sort a DiscovererInfo sublcass we do not support
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui: Do not crash when trying to sort a DiscovererInfo sublcass we do not support
- Date: Mon, 14 Jan 2013 12:39:15 +0000 (UTC)
commit ef0e4cc641bbfc47d7a086940f6a9789eed44922
Author: Thibault Saunier <thibault saunier collabora com>
Date: Fri Jan 11 16:27:08 2013 -0300
ui: Do not crash when trying to sort a DiscovererInfo sublcass we do not support
pitivi/utils/ui.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index c8b2bd5..9d82368 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -174,7 +174,10 @@ def beautify_info(info):
}
def stream_sort_key(stream):
- return ranks[type(stream)]
+ try:
+ return ranks[type(stream)]
+ except KeyError:
+ return len(ranks)
info.get_stream_list().sort(key=stream_sort_key)
nice_streams_txts = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]