1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-22 02:46:38 +02:00

fix the possibility to load a perl script even if it doesn't call register() function

This commit is contained in:
Emmanuel Bouthenot
2007-02-17 18:23:50 +00:00
parent aba6e1257d
commit 429167f032
8 changed files with 16 additions and 28 deletions
+2 -3
View File
@@ -2053,8 +2053,8 @@ weechat_python_load (t_weechat_plugin *plugin, char *filename)
plugin->print_server (plugin,
"Python warning: unable to redirect stderr");
}
python_current_script_filename = strdup (filename);
python_current_script_filename = filename;
if (PyRun_SimpleFile (fp, filename) != 0)
{
@@ -2077,7 +2077,6 @@ weechat_python_load (t_weechat_plugin *plugin, char *filename)
if (PyErr_Occurred ()) PyErr_Print ();
fclose (fp);
free (python_current_script_filename);
if (python_current_script == NULL)
{