--- a/dbapi.py Mon Jul 06 09:33:09 2009 +0200
+++ b/dbapi.py Mon Jul 06 09:33:36 2009 +0200
@@ -63,19 +63,19 @@
'application' % nsid)
return core.getProxyForURI(uri)
-def repo_connect(repo, user, password, cnxprops=None):
+def repo_connect(repo, login, password, cnxprops=None):
"""Constructor to create a new connection to the CubicWeb repository.
Returns a Connection instance.
"""
cnxprops = cnxprops or ConnectionProperties('inmemory')
- cnxid = repo.connect(unicode(user), password, cnxprops=cnxprops)
+ cnxid = repo.connect(unicode(login), password, cnxprops=cnxprops)
cnx = Connection(repo, cnxid, cnxprops)
if cnxprops.cnxtype == 'inmemory':
cnx.vreg = repo.vreg
return cnx
-def connect(database=None, user=None, password=None, host=None,
+def connect(database=None, login=None, password=None, host=None,
group=None, cnxprops=None, port=None, setvreg=True, mulcnx=True,
initlog=True):
"""Constructor for creating a connection to the CubicWeb repository.
@@ -111,11 +111,11 @@
vreg.set_schema(schema)
else:
vreg = None
- cnx = repo_connect(repo, user, password, cnxprops)
+ cnx = repo_connect(repo, login, password, cnxprops)
cnx.vreg = vreg
return cnx
-def in_memory_cnx(config, user, password):
+def in_memory_cnx(config, login, password):
"""usefull method for testing and scripting to get a dbapi.Connection
object connected to an in-memory repository instance
"""
@@ -128,7 +128,7 @@
repo = get_repository('inmemory', config=config, vreg=vreg)
# connection to the CubicWeb repository
cnxprops = ConnectionProperties('inmemory')
- cnx = repo_connect(repo, user, password, cnxprops=cnxprops)
+ cnx = repo_connect(repo, login, password, cnxprops=cnxprops)
return repo, cnx