Less indentation

main
Bob Mottram 2024-07-18 20:42:24 +01:00
parent bfa2c4c63b
commit fe547530d3
1 changed files with 12 additions and 11 deletions

View File

@ -879,10 +879,14 @@ def html_new_post(edit_post_params: {},
translate['Citations'] + ':</label></p>\n'
citations_str += ' <ul>\n'
citations_separator = '#####'
citations = []
try:
with open(citations_filename, 'r',
encoding='utf-8') as fp_cit:
citations = fp_cit.readlines()
except OSError as exc:
print('EX: html_new_post unable to read ' +
citations_filename + ' ' + str(exc))
for line in citations:
if citations_separator not in line:
continue
@ -894,9 +898,6 @@ def html_new_post(edit_post_params: {},
citations_str += \
' <li><a href="' + link + '"><cite>' + \
title + '</cite></a></li>'
except OSError as exc:
print('EX: html_new_post unable to read ' +
citations_filename + ' ' + str(exc))
citations_str += ' </ul>\n'
citations_str += '</div>\n'