summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-10-15 22:38:08 +0200
committeremkael <emkael@tlen.pl>2014-10-15 22:38:08 +0200
commita6812fff6a67ec83bf9e8b711f7659412cd95269 (patch)
treec5854bda42e2d4f5444588ae2a06b581adbe29f0
parentf1b990de03221a3ae4fc5d72582b5de9c1d3d2c1 (diff)
* universal directory separators
-rw-r--r--f1elo/db.py2
-rw-r--r--f1elo/elo.py2
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)