summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
authorJeff Armstrong <jeff@approximatrix.com>2013-07-27 14:42:40 -0400
committerJeff Armstrong <jeff@approximatrix.com>2013-07-27 14:42:40 -0400
commit0e7c76d6daee9c182a5d01c0227b77dcc36a915c (patch)
tree01ee42ad62090a92185cfe2213e5eab3c41de89e /src/room.py
parentf24f3866b5cc5ccf0eaf32489892e14f6d94f899 (diff)
downloadpyohio2013-0e7c76d6daee9c182a5d01c0227b77dcc36a915c.tar.gz
pyohio2013-0e7c76d6daee9c182a5d01c0227b77dcc36a915c.zip
done
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/room.py b/src/room.py
index 1bc3747..ca5430a 100644
--- a/src/room.py
+++ b/src/room.py
@@ -1,10 +1,10 @@
import json
import sqlite3
-def get_room(id):
+def get_room(id, dbfile):
ret = None
- con = sqlite3.connect("game.db")
+ con = sqlite3.connect(dbfile)
for row in con.execute("select json from rooms where id=?",(id,)):
@@ -14,6 +14,8 @@ def get_room(id):
ret = Room(**d)
break
+ con.close()
+
return ret
class Room():