[0.10.1] - Fix with try when checking static page
This commit is contained in:
parent
4df098260a
commit
49adf951ef
|
@ -6,6 +6,9 @@ Tyto - Littérateur
|
|||
- Changelog: https://git.a-lec.org/echolib/tyto-litterateur/-/blob/master/CHANGELOG.md
|
||||
- License: https://git.a-lec.org/echolib/tyto-litterateur/-/blob/master/LICENSE
|
||||
|
||||
## [0.10.1]
|
||||
- Fix with try in check for static page
|
||||
|
||||
## [0.10.0]
|
||||
- Add full static page option (--static) only with wip
|
||||
- Add <div> markers: `<<`, `>>`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: tyto
|
||||
Version: 0.10.0
|
||||
Version: 0.10.1
|
||||
Section: custom
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Version: 0.10.0
|
||||
# Version: 0.10.1
|
||||
# Tyto - Littérateur
|
||||
#
|
||||
# Copyright (C) 2023 Cyrille Louarn <echolib+tyto@a-lec.org>
|
||||
|
|
|
@ -873,8 +873,8 @@ def check_content(post_bottom):
|
|||
tpl2 = post_bottom.count(tag[1])
|
||||
|
||||
if tpl1 != tpl2:
|
||||
logs.out("22", '"%s" + "%s" > %s'%(
|
||||
tag[0], tag[1], db.uri_file
|
||||
logs.out("22", '%s*%s + %s*%s > %s'%(
|
||||
tpl1, tag[0], tpl2, tag[1], db.uri_file
|
||||
), False)
|
||||
|
||||
|
||||
|
@ -892,12 +892,15 @@ def check_static_posts():
|
|||
]
|
||||
|
||||
for srv_post, static in srv_posts:
|
||||
post_datas = open(srv_post, "r").read()
|
||||
if not re.findall(
|
||||
tyto.tags_html_mods[dom.wip_metas_f],
|
||||
post_datas
|
||||
):
|
||||
globals()[static] = "True"
|
||||
try:
|
||||
post_datas = open(srv_post, "r").read()
|
||||
if not re.findall(
|
||||
tyto.tags_html_mods[dom.wip_metas_f],
|
||||
post_datas
|
||||
):
|
||||
globals()[static] = "True"
|
||||
except:
|
||||
continue
|
||||
|
||||
|
||||
#===============================#
|
||||
|
|
Loading…
Reference in New Issue