mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
ed1f9eccba
Python2 core checks that the first argument of a method is of the type of the object if it does not have any info about the method, so when using Gst not initialized it raiser a TypeError and not a Gst.NotInitialized as expected. + And fix a typo
16 lines
566 B
Python
16 lines
566 B
Python
import os
|
|
import gi.overrides
|
|
|
|
if not gi.overrides.__path__[0].endswith("gst-python/gi/overrides"):
|
|
local_overrides = None
|
|
# our overrides don't take precedence, let's fix it
|
|
for i, path in enumerate(gi.overrides.__path__):
|
|
if path.endswith("gst-python/gi/overrides"):
|
|
local_overrides = path
|
|
|
|
if local_overrides:
|
|
gi.overrides.__path__.remove(local_overrides)
|
|
else:
|
|
local_overrides = os.path.abspath(os.path.join(__file__, "../", "../", "gi", "overrides"))
|
|
|
|
gi.overrides.__path__.insert(0, local_overrides)
|