summaryrefslogtreecommitdiff
path: root/jfr_playoff/db.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-01 02:50:24 +0200
committeremkael <emkael@tlen.pl>2017-08-01 02:50:24 +0200
commit7f76c56ab258c8978c39507eb997852e2280449d (patch)
tree9ebb6dd2e0a217cb2e587ada8fb4e26596ae2b1e /jfr_playoff/db.py
parentcf11f2639f965c70dd8237580a23e7441c670693 (diff)
Code style improved
Diffstat (limited to 'jfr_playoff/db.py')
-rw-r--r--jfr_playoff/db.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/jfr_playoff/db.py b/jfr_playoff/db.py
index aa0c2e2..8457dd4 100644
--- a/jfr_playoff/db.py
+++ b/jfr_playoff/db.py
@@ -13,7 +13,10 @@ class PlayoffDB(object):
)
self.db_cursor = self.database.cursor(buffered=True)
- def fetch(self, db, sql, params):
- self.db_cursor.execute(sql.replace('#db#', db), params)
+ def get_cursor(self):
+ return self.db_cursor
+
+ def fetch(self, db_name, sql, params):
+ self.db_cursor.execute(sql.replace('#db#', db_name), params)
row = self.db_cursor.fetchone()
return row