# HG changeset patch # User Julien Cristau # Date 1368547344 -7200 # Node ID 2a244f90a1e3a3313f8a0db0890f58b26ed2d847 # Parent 6bc1c1b4473a41bb44d4b0af99cdb789dffb7e17 [dbapi] fix connect backwards compat harder Passing None as group and host should result in "pyro:///cubicweb.appid", not "pyro://None/None.appid". Followup for 2091d275fe5c. Closes #2882666. diff -r 6bc1c1b4473a -r 2a244f90a1e3 dbapi.py --- 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':