mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Sanitize (a bit) plugins directory
This commit is contained in:
parent
4e516d097f
commit
6c05f9ff42
@ -239,8 +239,10 @@ class Client(Methods, BaseClient):
|
||||
else:
|
||||
log.warning(e)
|
||||
else:
|
||||
plugins_dir = self.plugins_dir.lstrip("./").replace("/", ".")
|
||||
|
||||
for i in dirs:
|
||||
module = import_module("{}.{}".format(self.plugins_dir, i.split(".")[0]))
|
||||
module = import_module("{}.{}".format(plugins_dir, i.split(".")[0]))
|
||||
|
||||
for j in dir(module):
|
||||
# noinspection PyBroadException
|
||||
|
Loading…
Reference in New Issue
Block a user