diff options
Diffstat (limited to 'f1elo')
-rw-r--r-- | f1elo/db.py | 2 | ||||
-rw-r--r-- | f1elo/elo.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/f1elo/db.py b/f1elo/db.py index dc40ba1..bf106a6 100644 --- a/f1elo/db.py +++ b/f1elo/db.py @@ -6,7 +6,7 @@ from f1elo.model import Driver from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker -config = json.load(open(path.dirname(__main__.__file__) + '/config/db.json')) +config = json.load(open(path.join(path.dirname(__main__.__file__), 'config', 'db.json'))) engine = create_engine("mysql://{0[user]}:{0[pass]}@{0[host]}/{0[db]}?charset=utf8".format(config)) Session = sessionmaker(bind=engine) diff --git a/f1elo/elo.py b/f1elo/elo.py index 99c1fd7..5e6986c 100644 --- a/f1elo/elo.py +++ b/f1elo/elo.py @@ -9,7 +9,7 @@ from f1elo.model import * class Elo: def __init__(self, session): self.session = session - self.config = json.load(open(path.dirname(__main__.__file__) + '/config/elo.json')) + self.config = json.load(open(path.join(path.dirname(__main__.__file__), 'config', 'elo.json'))) def get_ranking(self, driver, rank_date=None): rank = driver.get_ranking(rank_date) |