mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
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
|
||||
if loaded:
|
||||
return
|
||||
meta_template = Template(resources.read_text("maubot.cli", "res/maubot.yaml.j2"))
|
||||
mod_template = Template(resources.read_text("maubot.cli", "res/plugin.py.j2"))
|
||||
base_config = resources.read_text("maubot.cli", "res/config.yaml")
|
||||
meta_template = Template(resources.files("maubot.cli").joinpath("res/maubot.yaml.j2").read_text(encoding="utf-8"))
|
||||
mod_template = Template(resources.files("maubot.cli").joinpath("res/plugin.py.j2").read_text(encoding="utf-8"))
|
||||
base_config = resources.files("maubot.cli").joinpath("res/config.yaml").read_text(encoding="utf-8")
|
||||
loaded = True
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user