From ba161305eb3217e4e3bf91f3e35e813c3d18b03c Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Thu, 2 Mar 2023 16:16:42 +0100 Subject: [PATCH] target: all. fix with wip action again --- src/var/lib/tyto/program/infos.py | 16 ++++++---------- src/var/lib/tyto/program/wip.py | 3 ++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/var/lib/tyto/program/infos.py b/src/var/lib/tyto/program/infos.py index 4686c26..78a626d 100644 --- a/src/var/lib/tyto/program/infos.py +++ b/src/var/lib/tyto/program/infos.py @@ -23,16 +23,12 @@ def tyto(target): noinfos = False # Show Version - try: - if os.path.exists('/usr/bin/tyto'): - tytobin = open('/usr/bin/tyto').read() - for line in tytobin.rsplit('\n'): - if line.startswith('# Version:'): - print(line) - break - except: - noinfo = True - print(':< No /usr/bin/tyto') + tytobin = open('/usr/bin/tyto').read() + for line in tytobin.rsplit('\n'): + if line.startswith('# Version:'): + print(line) + break + # Show domains list try: diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 5594b74..297e10f 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -44,7 +44,8 @@ def manage_wip(target): if post_db.endswith('.conf'): # Load DB post_db = '%s%s'%(db.articles_db, post_db) - args.target = 'index.tyto' + exec(open(post_db).read(),globals()) + args.target = post_src.rsplit('%s/'%db.in_dir)[1] importlib.reload(db) print(':> [%s] | %s'%(db.title, db.post_src)) if not db.hash_wip: continue