check. Fix snpic when NAME is null
This commit is contained in:
parent
e6e02ea30e
commit
7d36fb858d
|
@ -520,6 +520,8 @@ def check_3lines(tag, ln, line):
|
||||||
ln, tag, langs.site.name, db.uri_file
|
ln, tag, langs.site.name, db.uri_file
|
||||||
), False)
|
), False)
|
||||||
post_err = True
|
post_err = True
|
||||||
|
if tag == "snpic":
|
||||||
|
return
|
||||||
|
|
||||||
# abbr:
|
# abbr:
|
||||||
elif tag == "abbr":
|
elif tag == "abbr":
|
||||||
|
@ -648,7 +650,7 @@ def check_snpic(name):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Search post_header for image: %name
|
# Search post_header for image: %name
|
||||||
Found = False
|
found = False
|
||||||
tag = tyto.opt_header_tags[1]
|
tag = tyto.opt_header_tags[1]
|
||||||
for ln, line in enumerate(post_header.rsplit('\n'), 1):
|
for ln, line in enumerate(post_header.rsplit('\n'), 1):
|
||||||
if line.startswith('%s:'%tag):
|
if line.startswith('%s:'%tag):
|
||||||
|
@ -658,13 +660,14 @@ def check_snpic(name):
|
||||||
check_name = ''
|
check_name = ''
|
||||||
|
|
||||||
if check_name == name:
|
if check_name == name:
|
||||||
Found = True
|
found = True
|
||||||
snpic_post = post_header.rsplit('\n')[ln].lstrip()
|
snpic_post = post_header.rsplit('\n')[ln].lstrip()
|
||||||
check_file_uri("snpic", snpic_post, ln)
|
check_file_uri("snpic", snpic_post, ln)
|
||||||
break
|
break
|
||||||
|
|
||||||
if not Found:
|
if not found:
|
||||||
logs.out("27", '"%s: %s" > %s'%(tag, name, db.uri_file), False)
|
logs.out("27", '"%s: %s" > %s'%(tag, name, db.uri_file), False)
|
||||||
|
post_err = True
|
||||||
return
|
return
|
||||||
|
|
||||||
snpic_post = True
|
snpic_post = True
|
||||||
|
|
Loading…
Reference in New Issue