--- a/dbapi.py Thu May 23 17:32:56 2013 +0200
+++ b/dbapi.py Wed May 29 16:44:16 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':