fix: use resources.files...
read_text is deprecated Co-authored-by: chayleaf <chayleaf@pavluk.org>
This commit is contained in:
parent
61f528d9b3
commit
6e5e40e7e4
@ -33,9 +33,9 @@ def load_templates():
|
|||||||
global mod_template, meta_template, base_config, loaded
|
global mod_template, meta_template, base_config, loaded
|
||||||
if loaded:
|
if loaded:
|
||||||
return
|
return
|
||||||
meta_template = Template(resources.read_text("maubot.cli", "res/maubot.yaml.j2"))
|
meta_template = Template(resources.files("maubot.cli").joinpath("res/maubot.yaml.j2").read_text(encoding="utf-8"))
|
||||||
mod_template = Template(resources.read_text("maubot.cli", "res/plugin.py.j2"))
|
mod_template = Template(resources.files("maubot.cli").joinpath("res/plugin.py.j2").read_text(encoding="utf-8"))
|
||||||
base_config = resources.read_text("maubot.cli", "res/config.yaml")
|
base_config = resources.files("maubot.cli").joinpath("res/config.yaml").read_text(encoding="utf-8")
|
||||||
loaded = True
|
loaded = True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user