From f47618dfe2a43f54cb593a8bc1f380fad5f435fe Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Fri, 27 Dec 2019 19:05:54 +0100 Subject: [PATCH] release the lockfile before exiting when using --rss-sections option. fixes #47 --- feed2toot/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/feed2toot/main.py b/feed2toot/main.py index 8e7b52a..641a14a 100644 --- a/feed2toot/main.py +++ b/feed2toot/main.py @@ -98,9 +98,11 @@ class Main: if clioptions.rsssections: if entries: print('The following sections are available in this RSS feed: {}'.format([j for j in entries[0]])) - sys.exit(0) else: - sys.exit('Could not parse the section of the rss feed') + print('Could not parse the section of the rss feed') + # release the lock file + lockfile.release() + sys.exit(0) # sort entries and check if they were not previously sent totweet = sort_entries(clioptions.all, cache, entries) for entry in totweet: