From: Ben Sturmfels Date: Fri, 1 Nov 2019 05:41:45 +0000 (+1100) Subject: Prevent warning when importing GstPbutils. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=48208c278c62781bd6d9acd9540e364550506162;p=mediagoblin.git Prevent warning when importing GstPbutils. Warning was: PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded. --- diff --git a/mediagoblin/media_types/video/transcoders.py b/mediagoblin/media_types/video/transcoders.py index d6aae7cf..b0350c76 100644 --- a/mediagoblin/media_types/video/transcoders.py +++ b/mediagoblin/media_types/video/transcoders.py @@ -36,6 +36,7 @@ gi.require_version('Gst', '1.0') from gi.repository import GLib, Gst Gst.init(None) # init before import to work around https://bugzilla.gnome.org/show_bug.cgi?id=736260 +gi.require_version('GstPbutils', '1.0') from gi.repository import GstPbutils sys.argv = old_argv