From d062b6795f52a1dc04d6dbd1cad32fc11196fbe3 Mon Sep 17 00:00:00 2001 From: RabbitFoRed <73241991+RabbitFored@users.noreply.github.com> Date: Fri, 6 Sep 2024 14:29:20 +0530 Subject: [PATCH] pyrofork: fix "Ignoring non-existent module error" warning when using a paths string as plugin root dir. (#94) example code: app = Client(...., plugins=dict(root="bot/plugins", exlude=['toremove'])) warning: pyrogram.client - [UNLOAD] Ignoring non-existent module "bot/plugins.toremove" --- pyrogram/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client.py b/pyrogram/client.py index aee53c10..5fa43849 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -801,7 +801,7 @@ class Client(Methods): pass else: for path, handlers in include: - module_path = root + "." + path + module_path = root.replace("/",".") + "." + path warn_non_existent_functions = True try: @@ -836,7 +836,7 @@ class Client(Methods): if exclude: for path, handlers in exclude: - module_path = root + "." + path + module_path = root.replace("/",".") + "." + path warn_non_existent_functions = True try: