add parameter toot for [rss] section. fixes #10

This commit is contained in:
Carl Chenet 2017-04-21 03:51:09 +02:00
parent 2f000b7cec
commit e00d39dcce

View file

@ -55,11 +55,14 @@ class ConfParse(object):
############################ ############################
# tweet option # tweet option
############################ ############################
confoption = 'tweet' oldconfoption = 'tweet'
if config.has_option(section, confoption): confoption = 'toot'
if config.has_option(section, oldconfoption):
self.tweetformat = config.get(section, oldconfoption)
elif config.has_option(section, confoption):
self.tweetformat = config.get(section, confoption) self.tweetformat = config.get(section, confoption)
else: else:
sys.exit('You should define a format for your tweet with the keyword "tweet" in the [rss] section') sys.exit('You should define a format for your tweet with the parameter "{confoption}" in the [{section}] section'.format(confoption=confoption, section=section))
############################ ############################
# pattern format option # pattern format option
############################ ############################