Skip to content

Commit 69e69ca

Browse files
author
Jason Grout
committed
Fix some import errors in miscopy
1 parent 9321f6b commit 69e69ca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

misc.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sys
2-
import sagecell_config
32

43
def select_db(sysargs, context=None):
54
u"""
@@ -10,6 +9,7 @@ def select_db(sysargs, context=None):
109
:type context: zmq.Context
1110
:returns: a tuple of the form ``(db, fs)``
1211
"""
12+
import sagecell_config
1313
try:
1414
db=sysargs.db
1515
except:
@@ -38,8 +38,7 @@ def select_db(sysargs, context=None):
3838
return db_sqlalchemy.DB('sqlalchemy_sqlite.db'), None # None should be replaced by the sqlite filestore
3939
elif db=="mongo":
4040
import pymongo, db_mongo, filestore
41-
import sagecell_config
42-
from sagecell_config import mongo_config
41+
mongo_config = sagecell_config.mongo_config
4342

4443
if '@' in mongo_config['mongo_uri']:
4544
# password specified, so we need to include the database in the URI

0 commit comments

Comments
 (0)