From a3a6fc0b2feb7ff822767e2cebda7a1a82c96006 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 18 Jul 2024 20:44:48 +0100 Subject: [PATCH] Less indentation --- webapp_column_right.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/webapp_column_right.py b/webapp_column_right.py index fb89859b7..c918cfe80 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -376,20 +376,21 @@ def html_citations(base_dir: str, nickname: str, domain: str, citations_selected = [] if os.path.isfile(citations_filename): citations_separator = '#####' + citations = [] try: with open(citations_filename, 'r', encoding='utf-8') as fp_cit: citations = fp_cit.readlines() - for line in citations: - if citations_separator not in line: - continue - sections = line.strip().split(citations_separator) - if len(sections) != 3: - continue - date_str = sections[0] - citations_selected.append(date_str) except OSError as exc: print('EX: html_citations unable to read ' + citations_filename + ' ' + str(exc)) + for line in citations: + if citations_separator not in line: + continue + sections = line.strip().split(citations_separator) + if len(sections) != 3: + continue + date_str = sections[0] + citations_selected.append(date_str) # the css filename css_filename = base_dir + '/epicyon-profile.css'