From fe547530d3f7bf26dccf683a69272fc2c86583f2 Mon Sep 17 00:00:00 2001
From: Bob Mottram
Date: Thu, 18 Jul 2024 20:42:24 +0100
Subject: [PATCH] Less indentation
---
webapp_create_post.py | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/webapp_create_post.py b/webapp_create_post.py
index 50476f62a..8ccc11110 100644
--- a/webapp_create_post.py
+++ b/webapp_create_post.py
@@ -879,24 +879,25 @@ def html_new_post(edit_post_params: {},
translate['Citations'] + ':
\n'
citations_str += ' \n'
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
- title = sections[1]
- link = sections[2]
- citations_str += \
- ' - ' + \
- title + '
'
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
+ sections = line.strip().split(citations_separator)
+ if len(sections) != 3:
+ continue
+ title = sections[1]
+ link = sections[2]
+ citations_str += \
+ ' - ' + \
+ title + '
'
citations_str += '
\n'
citations_str += '\n'