summaryrefslogtreecommitdiff
path: root/src/plugins/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python')
-rw-r--r--src/plugins/python/weechat-python.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 0a4cca493..5cce23548 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -1053,10 +1053,14 @@ weechat_python_load (const char *filename, const char *code)
void
weechat_python_load_cb (void *data, const char *filename)
{
+ const char *pos_dot;
+
/* make C compiler happy */
(void) data;
- weechat_python_load (filename, NULL);
+ pos_dot = strrchr (filename, '.');
+ if (pos_dot && (strcmp (pos_dot, ".py") == 0))
+ weechat_python_load (filename, NULL);
}
/*