release the lockfile before exiting when using --rss-sections option. fixes #47

This commit is contained in:
Carl Chenet 2019-12-27 19:05:54 +01:00
parent 15415e369a
commit f47618dfe2

View File

@ -98,9 +98,11 @@ class Main:
if clioptions.rsssections: if clioptions.rsssections:
if entries: if entries:
print('The following sections are available in this RSS feed: {}'.format([j for j in entries[0]])) print('The following sections are available in this RSS feed: {}'.format([j for j in entries[0]]))
sys.exit(0)
else: 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 # sort entries and check if they were not previously sent
totweet = sort_entries(clioptions.all, cache, entries) totweet = sort_entries(clioptions.all, cache, entries)
for entry in totweet: for entry in totweet: