mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Assume main class is in last module instead of first
This commit is contained in:
parent
2c60342cc6
commit
7759643e93
@ -167,7 +167,7 @@ class ZippedPluginLoader(PluginLoader):
|
|||||||
if "/" in meta.main_class:
|
if "/" in meta.main_class:
|
||||||
self.main_module, self.main_class = meta.main_class.split("/")[:2]
|
self.main_module, self.main_class = meta.main_class.split("/")[:2]
|
||||||
else:
|
else:
|
||||||
self.main_module = meta.modules[0]
|
self.main_module = meta.modules[-1]
|
||||||
self.main_class = meta.main_class
|
self.main_class = meta.main_class
|
||||||
self._file = file
|
self._file = file
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ with open(args.meta, "r") as meta_file:
|
|||||||
if "/" in meta.main_class:
|
if "/" in meta.main_class:
|
||||||
module, main_class = meta.main_class.split("/", 1)
|
module, main_class = meta.main_class.split("/", 1)
|
||||||
else:
|
else:
|
||||||
module = meta.modules[0]
|
module = meta.modules[-1]
|
||||||
main_class = meta.main_class
|
main_class = meta.main_class
|
||||||
|
|
||||||
if args.meta != "maubot.yaml" and os.path.dirname(args.meta) != "":
|
if args.meta != "maubot.yaml" and os.path.dirname(args.meta) != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user