summaryrefslogtreecommitdiff
path: root/ausbutler/interface.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-05-04 23:19:14 +0200
committeremkael <emkael@tlen.pl>2017-05-09 02:51:36 +0200
commit9ad496966ab94c37cbf4208ec1fd39257cb60410 (patch)
tree4bbb7bce3d4eb598f723e76211c9f29c5feb0635 /ausbutler/interface.py
parent557569d76e9ccaaef9df4b6d49cb14a55b5e4980 (diff)
Verbose DB name read
Diffstat (limited to 'ausbutler/interface.py')
-rw-r--r--ausbutler/interface.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ausbutler/interface.py b/ausbutler/interface.py
index 052d910..984b59b 100644
--- a/ausbutler/interface.py
+++ b/ausbutler/interface.py
@@ -8,6 +8,7 @@ from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from .butler import cutoff, get_line, get_opponents, get_room, normalize, get_old_normbutler
+from .config import load_config
from .db import get_session
from .model import AusButler, Butler
from .tour_config import Constants, Translations
@@ -16,7 +17,9 @@ from .tour_config import Constants, Translations
class Interface(object):
def __init__(self, config):
- self.session = get_session()
+ db_config = load_config('db')
+ print 'Tournament name: %s' % (db_config['db'])
+ self.session = get_session(db_config)
self.config = config
self.translation = Translations()
self.template = Environment(loader=FileSystemLoader('template'))