mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 23:24:50 +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
|
pass
|
||||||
else:
|
else:
|
||||||
for path, handlers in include:
|
for path, handlers in include:
|
||||||
module_path = root + "." + path
|
module_path = root.replace("/",".") + "." + path
|
||||||
warn_non_existent_functions = True
|
warn_non_existent_functions = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -836,7 +836,7 @@ class Client(Methods):
|
||||||
|
|
||||||
if exclude:
|
if exclude:
|
||||||
for path, handlers in exclude:
|
for path, handlers in exclude:
|
||||||
module_path = root + "." + path
|
module_path = root.replace("/",".") + "." + path
|
||||||
warn_non_existent_functions = True
|
warn_non_existent_functions = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue