Less indentation

merge-requests/30/head
Bob Mottram 2024-07-15 21:01:51 +01:00
parent 81d88f2384
commit da3536c40f
1 changed files with 9 additions and 8 deletions

View File

@ -1141,14 +1141,15 @@ def _add_schedule_post(base_dir: str, nickname: str, domain: str,
except OSError as ex:
print('EX: Failed to write entry to scheduled posts index ' +
schedule_index_filename + ' ' + str(ex))
else:
try:
with open(schedule_index_filename, 'w+',
encoding='utf-8') as fp_schedule:
fp_schedule.write(index_str + '\n')
except OSError as ex:
print('EX: Failed to write entry to scheduled posts index2 ' +
schedule_index_filename + ' ' + str(ex))
return
try:
with open(schedule_index_filename, 'w+',
encoding='utf-8') as fp_schedule:
fp_schedule.write(index_str + '\n')
except OSError as ex:
print('EX: Failed to write entry to scheduled posts index2 ' +
schedule_index_filename + ' ' + str(ex))
def _create_post_cw_from_reply(base_dir: str, nickname: str, domain: str,