From 164eaffea7a0d8bff65f554de70c8e5937830166 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 16 Apr 2013 23:05:15 +0200 Subject: [PATCH] deps: Group GStreamer elements by found/not found --- mopidy/utils/deps.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/mopidy/utils/deps.py b/mopidy/utils/deps.py index 9e73583c..b1e9c508 100644 --- a/mopidy/utils/deps.py +++ b/mopidy/utils/deps.py @@ -106,9 +106,27 @@ def gstreamer_info(): other = [] other.append('Python wrapper: gst-python %s' % ( '.'.join(map(str, gst.get_pygst_version())))) - other.append('Relevant elements:') + + found_elements = [] + missing_elements = [] for name, status in _gstreamer_check_elements(): - other.append(' %s: %s' % (name, 'OK' if status else 'not found')) + if status: + found_elements.append(name) + else: + missing_elements.append(name) + + other.append('Relevant elements:') + other.append(' Found:') + for element in found_elements: + other.append(' %s' % element) + else: + other.append(' none') + other.append(' Not found:') + for element in missing_elements: + other.append(' %s' % element) + else: + other.append(' none') + return { 'name': 'GStreamer', 'version': '.'.join(map(str, gst.get_gst_version())),