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"
This commit is contained in:
RabbitFoRed 2024-09-06 14:29:20 +05:30 committed by wulan17
parent 053232b15a
commit d062b6795f
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -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: