From 12f483c263642dcf30a3c034fd6578f233a801cb Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Fri, 3 Mar 2023 16:08:21 +0100 Subject: [PATCH] working on publish template command #3 --- src/var/lib/tyto/program/html.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/var/lib/tyto/program/html.py b/src/var/lib/tyto/program/html.py index 6911bb5..92bb1a2 100644 --- a/src/var/lib/tyto/program/html.py +++ b/src/var/lib/tyto/program/html.py @@ -480,15 +480,15 @@ def create_user_metas(option): if not res in ['y', 'Y']: logs.out("255", '', True) - user_file = open(db.metas_load, 'r').read() - - for line in user_file.rsplit('\n'): - if line.startswith(metas_used): - if user_metas: user_metas = "%s\n %s"%(user_metas, line) - else: user_metas = ' %s'%line - - tyto.set_file(target, True, user_metas) - print(log_html) + user_file = open(db.metas_load, 'r').read() + + for line in user_file.rsplit('\n'): + if line.startswith(metas_used): + if user_metas: user_metas = "%s\n %s"%(user_metas, line) + else: user_metas = ' %s'%line + + tyto.set_file(target, True, user_metas) + print(log_html) #=========================================#