check: fixed for empty markers in header post
This commit is contained in:
parent
0560c4665c
commit
a2045a62ba
|
@ -419,6 +419,7 @@ def if_mandat_marker(marker, m_in):
|
|||
m_in[1], marker
|
||||
)
|
||||
log.append_f(post_logs, msg_log, 1)
|
||||
Post_Err = True
|
||||
|
||||
#================================#
|
||||
# Check Date format and validity #
|
||||
|
@ -499,11 +500,20 @@ def check_links(line, ln, stats_links_uniq):
|
|||
global Post_Err, stats_links_p
|
||||
|
||||
# Create variable array
|
||||
link_nbr = 'link_%s'%stats_links_uniq
|
||||
link_name = line.split('link:')[1].lstrip()
|
||||
link_url = headers.rsplit('\n')[ln].lstrip()
|
||||
link_alt = headers.rsplit('\n')[ln+1].lstrip()
|
||||
try: link_name = line.split('link:')[1].lstrip()
|
||||
except: link_name = ''
|
||||
try: link_url = headers.rsplit('\n')[ln].lstrip()
|
||||
except: link_url = ''
|
||||
try: link_alt = headers.rsplit('\n')[ln+1].lstrip()
|
||||
except: link_alt = ''
|
||||
|
||||
if not link_name:
|
||||
msg_log = 'Line %s. Unused NAME for marker "link:"'%ln
|
||||
log.append_f(post_logs,msg_log,1)
|
||||
Post_Err = True
|
||||
return(1)
|
||||
|
||||
link_nbr = 'link_%s'%stats_links_uniq
|
||||
# Check 2nd line
|
||||
check_new_marker(link_url)
|
||||
if new_marker: link_url = ''
|
||||
|
@ -530,7 +540,6 @@ def check_links(line, ln, stats_links_uniq):
|
|||
log.append_f(post_logs,msg_log,1)
|
||||
Post_Err = True
|
||||
|
||||
|
||||
if Post_Err: return
|
||||
# Set final marker_N
|
||||
link = (
|
||||
|
|
Loading…
Reference in New Issue