From ed810960717c2967fd4ce8660c5264edca82a4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 28 May 2019 12:29:13 +0200 Subject: [PATCH] fallback on all non-critical config options --- delojza.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/delojza.py b/delojza.py index 6bc850b..65a5ade 100755 --- a/delojza.py +++ b/delojza.py @@ -553,13 +553,13 @@ if __name__ == '__main__': delojza = DelojzaBot(config.get('delojza', 'tg_api_key'), config.get('delojza', 'OUT_DIR', fallback=os.path.join(_DIR_, "out")), tmp_dir=config.get('delojza', 'tmp_dir', fallback=tempfile.gettempdir()), - protected_chats=config.get('delojza', 'protected_chats').split(";"), - protected_tags=config.get('delojza', 'protected_tags').split(";"), - acoustid_key=config.get('delojza', 'acoustid_api_key'), - tumblr_name=config.get('tumblr', 'blog_name'), - tumblr_keys=(config.get('tumblr', 'consumer_key'), - config.get('tumblr', 'consumer_secret'), - config.get('tumblr', 'oauth_key'), - config.get('tumblr', 'oauth_secret')), + protected_chats=config.get('delojza', 'protected_chats', fallback='').split(";"), + protected_tags=config.get('delojza', 'protected_tags', fallback='').split(";"), + acoustid_key=config.get('delojza', 'acoustid_api_key', fallback=None), + tumblr_name=config.get('tumblr', 'blog_name', fallback=None), + tumblr_keys=(config.get('tumblr', 'consumer_key', fallback=None), + config.get('tumblr', 'consumer_secret', fallback=None), + config.get('tumblr', 'oauth_key', fallback=None), + config.get('tumblr', 'oauth_secret', fallback=None)), markov=markov) delojza.run_idle()