--- a/dbapi.py Thu May 23 12:35:02 2013 +0200
+++ b/dbapi.py Tue May 14 18:02:24 2013 +0200
@@ -213,9 +213,13 @@
elif cnxprops and cnxprops.cnxtype == 'inmemory':
database = 'inmemory://' + database
else:
- database = 'pyro://%s/%s.%s' % (kwargs.pop('host', ''),
- kwargs.pop('group', 'cubicweb'),
- database)
+ host = kwargs.pop('host', None)
+ if host is None:
+ host = ''
+ group = kwargs.pop('group', None)
+ if group is None:
+ group = 'cubicweb'
+ database = 'pyro://%s/%s.%s' % (host, group, database)
puri = urlparse(database)
method = puri.scheme.lower()
if method == 'inmemory':