initial.txt fallback (no markov)

This commit is contained in:
Tomáš Mládek 2019-05-02 19:26:25 +02:00
parent 617f6cc6f3
commit c4352df8fc

View file

@ -464,7 +464,10 @@ if __name__ == '__main__':
logging.error("No config file found, stopping.")
sys.exit(-1)
try:
markov = MarkovBlabberer("initial.txt")
except FileNotFoundError:
markov = None
delojza = DelojzaBot(config.get('delojza', 'tg_api_key'),
config.get('delojza', 'OUT_DIR', fallback=os.path.join(_DIR_, "out")),