[dbapi] Fix broken inmemory:// URLs parsing (closes #3225832)
ParseResult.path is what comes after the "domain name" in standard URLs.
So in the case of 'inmemory://<instance' URLs, it is always empty.
ParseResult.netloc contains the "domain name" part that we really want.
--- a/dbapi.py Thu Oct 10 13:16:54 2013 +0200
+++ b/dbapi.py Thu Oct 17 10:30:35 2013 +0200
@@ -223,7 +223,7 @@
puri = urlparse(database)
method = puri.scheme.lower()
if method == 'inmemory':
- config = cwconfig.instance_configuration(puri.path)
+ config = cwconfig.instance_configuration(puri.netloc)
else:
config = cwconfig.CubicWebNoAppConfiguration()
repo = get_repository(database, config=config)