mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
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:
parent
053232b15a
commit
d062b6795f
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue