check. Fix snpic when NAME is null

This commit is contained in:
Cyrille L 2023-04-07 18:44:41 +02:00
parent e6e02ea30e
commit 7d36fb858d
1 changed files with 7 additions and 4 deletions

View File

@ -519,7 +519,9 @@ def check_3lines(tag, ln, line):
logs.out("2", 'L=%s. "%s: %s" > %s'%(
ln, tag, langs.site.name, db.uri_file
), False)
post_err = True
post_err = True
if tag == "snpic":
return
# abbr:
elif tag == "abbr":
@ -648,7 +650,7 @@ def check_snpic(name):
pass
# Search post_header for image: %name
Found = False
found = False
tag = tyto.opt_header_tags[1]
for ln, line in enumerate(post_header.rsplit('\n'), 1):
if line.startswith('%s:'%tag):
@ -658,13 +660,14 @@ def check_snpic(name):
check_name = ''
if check_name == name:
Found = True
found = True
snpic_post = post_header.rsplit('\n')[ln].lstrip()
check_file_uri("snpic", snpic_post, ln)
break
if not Found:
if not found:
logs.out("27", '"%s: %s" > %s'%(tag, name, db.uri_file), False)
post_err = True
return
snpic_post = True