From 17d96edd41a1d29f6beb2152723df50864fbad89 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 8 Feb 2016 00:28:29 +0100 Subject: [PATCH] gst1: Import GstPbutils after calling Gst.init With gst-python 1.6.2, importing GstPbutils before calling Gst.init gives some warnings. --- mopidy/internal/gi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mopidy/internal/gi.py b/mopidy/internal/gi.py index 229277c3..7fa51f09 100644 --- a/mopidy/internal/gi.py +++ b/mopidy/internal/gi.py @@ -7,8 +7,7 @@ import textwrap try: import gi gi.require_version('Gst', '1.0') - gi.require_version('GstPbutils', '1.0') - from gi.repository import GLib, GObject, Gst, GstPbutils + from gi.repository import GLib, GObject, Gst except ImportError: print(textwrap.dedent(""" ERROR: A GObject Python package was not found. @@ -23,6 +22,8 @@ except ImportError: raise else: Gst.init([]) + gi.require_version('GstPbutils', '1.0') + from gi.repository import GstPbutils REQUIRED_GST_VERSION = (1, 2, 3)