GNOME Bugzilla – Bug 783520
Removing default debug/log function doesn't work in python
Last modified: 2017-12-01 00:24:49 UTC
In python Gst documentation (https://lazka.github.io/pgi-docs/Gst-1.0/functions.html#Gst.debug_log_default) is a line which says: "You can add other handlers by using Gst.debug_add_log_function(). And you can remove this handler by calling Gst.debug_remove_log_function(Gst.debug_log_default);" This however does nothing (returns 0). What works, is using: Gst.debug_remove_log_function_by_data(0) despite the documentation (https://lazka.github.io/pgi-docs/Gst-1.0/functions.html#Gst.debug_remove_log_function_by_data), which says: "Parameters: func (Gst.LogFunction or None) – the log function to remove, or None to remove the default log function" But "None" throws: "TypeError: Argument 0 does not allow None as a value"
Those pgi-docs are not provided by us. So you're saying that this Gst.debug_remove_log_function(None) does not work for you, right? It seems to work for me: python >>> import gi >>> gi.require_version('Gst', '1.0') >>> from gi.repository import GObject, Gst >>> Gst.debug_remove_log_function(None) 1L >>> Gst.version() (major=1L, minor=10L, micro=4L, nano=0L)
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!