Less indentation

main
Bob Mottram 2024-07-19 11:59:57 +01:00
parent ace9f84d9a
commit 12056b55c2
1 changed files with 7 additions and 6 deletions

View File

@ -267,9 +267,10 @@ def remove_scheduled_posts(base_dir: str, nickname: str, domain: str) -> None:
return return
for scheduled_post_filename in os.listdir(scheduled_dir): for scheduled_post_filename in os.listdir(scheduled_dir):
file_path = os.path.join(scheduled_dir, scheduled_post_filename) file_path = os.path.join(scheduled_dir, scheduled_post_filename)
if os.path.isfile(file_path): if not os.path.isfile(file_path):
try: continue
os.remove(file_path) try:
except OSError: os.remove(file_path)
print('EX: remove_scheduled_posts unable to delete ' + except OSError:
file_path) print('EX: remove_scheduled_posts unable to delete ' +
file_path)