From 63bf9e4035c76911e957c9586515ac780a8b3148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Fri, 18 Aug 2017 23:57:18 +0200 Subject: [PATCH] fix import of database models, botan --- shared_vars.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared_vars.py b/shared_vars.py index e966c55..4181aef 100644 --- a/shared_vars.py +++ b/shared_vars.py @@ -23,6 +23,7 @@ from telegram.contrib.botan import Botan from game_manager import GameManager from database import db +import user_setting # required to generate db mapping db.bind('sqlite', 'uno.sqlite3', create_db=True) db.generate_mapping(create_tables=True) @@ -33,4 +34,7 @@ with open("config.json","r") as f: updater = Updater(token=config.get("token"), workers=config.get("workers", 32)) dispatcher = updater.dispatcher -botan = Botan(config.get("botan_token", None)) +if config.get("botan_token"): + botan = Botan(config.get("botan_token")) +else: + botan = None \ No newline at end of file