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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user