gedit/gedit-2.25.5-fix-python-path.patch

14 lines
714 B
Diff

diff -up gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c.fix-python-path gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c
--- gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c.fix-python-path 2009-01-26 12:36:50.289751027 -0500
+++ gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c 2009-01-26 12:39:23.668963430 -0500
@@ -541,6 +541,9 @@ gedit_python_init (GeditPluginLoaderPyth
PySys_SetArgv (1, argv);
+ /* Sanitize sys.path, see http://bugzilla.gnome.org/show_bug.cgi?id=569214 */
+ PyRun_SimpleString ("import sys; sys.path = filter(None, sys.path)");
+
if (!gedit_check_pygtk2 ())
{
/* Warning message already printed in check_pygtk2 */