[pitivi] ui: Clarify what beautify_info receives
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui: Clarify what beautify_info receives
- Date: Sun, 2 Mar 2014 12:38:24 +0000 (UTC)
commit aecbfd3fd621df828dca6949b205a9eaedc27e65
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Mar 1 16:55:58 2014 +0100
ui: Clarify what beautify_info receives
pitivi/utils/ui.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index 392b9e5..4b079e5 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -214,8 +214,12 @@ def set_cairo_color(context, color):
context.set_source_rgb(*cairo_color)
-#------ Helper to help beatify indos so they can be displayed in the UI -----#
def beautify_info(info):
+ """
+ Formats the specified info for display.
+
+ @type info: L{DiscovererInfo}
+ """
ranks = {
DiscovererVideoInfo: 0,
DiscovererAudioInfo: 1,
@@ -235,12 +239,12 @@ def beautify_info(info):
beautified_string = beautify_stream(stream)
except NotImplementedError:
doLog(ERROR, "Beautify", "None", "Cannot beautify %s", stream)
- else:
- if beautified_string is not None:
- nice_streams_txts.append(beautified_string)
+ continue
+ if beautified_string:
+ nice_streams_txts.append(beautified_string)
return ("<b>" + info_name(info) + "</b>\n" +
- "\n".join((nice for nice in nice_streams_txts)))
+ "\n".join(nice_streams_txts))
def info_name(info):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]