Empty sqlite path will now use a :memory: database

This commit is contained in:
carlio 2013-01-05 11:22:45 +01:00
parent 4cb5f889bf
commit fc70e019ba

View file

@ -53,6 +53,11 @@ def parse(url):
path = url.path[1:]
path = path.split('?', 2)[0]
# if we are using sqlite and we have no path, then assume we
# want an in-memory database (this is the behaviour of sqlalchemy)
if url.scheme == 'sqlite' and path == '':
path = ':memory:'
# Update with environment configuration.
config.update({
'NAME': path,