From 3814caeb116616469184853c33bd73e6d313bdb3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Jul 2024 20:48:44 +0100 Subject: [PATCH] Less indentation --- newsdaemon.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/newsdaemon.py b/newsdaemon.py index d884f18ee..854bc3080 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -62,13 +62,14 @@ def _update_feeds_outbox_index(base_dir: str, domain: str, except OSError as ex: print('EX: Failed to write entry to feeds posts index ' + index_filename + ' ' + str(ex)) - else: - try: - with open(index_filename, 'w+', encoding='utf-8') as fp_feeds: - fp_feeds.write(post_id + '\n') - except OSError: - print('EX: _update_feeds_outbox_index unable to write ' + - index_filename) + return + + try: + with open(index_filename, 'w+', encoding='utf-8') as fp_feeds: + fp_feeds.write(post_id + '\n') + except OSError: + print('EX: _update_feeds_outbox_index unable to write ' + + index_filename) def _save_arrived_time(post_filename: str, arrived: str) -> None: