fix create plugin under windows

This commit is contained in:
avollkopf 2022-03-15 06:53:40 +01:00
parent fda8042ff1
commit d8ba8c0ac5
2 changed files with 5 additions and 1 deletions

View file

@ -1 +1 @@
__version__ = "4.0.3"
__version__ = "4.0.3.a1"

View file

@ -263,6 +263,10 @@ def plugin_create():
fh.write(outputText)
TEMPLATE_FILE = os.path.join("/", name, "config.yaml")
operatingsystem = str(platform.system()).lower()
if operatingsystem.startswith("win"):
TEMPLATE_FILE=str(TEMPLATE_FILE).replace('\\','/')
template = templateEnv.get_template(TEMPLATE_FILE)
outputText = template.render(name=name)