Commit 80fe1ad5 authored by Remi Rampin's avatar Remi Rampin

Fix --database=filename

When passing a filename with no directory whatsoever, makedirs() would
be called with '' and fail.
parent f782f724
Pipeline #66381018 passed with stage
in 2 minutes and 4 seconds
......@@ -38,6 +38,7 @@ def prepare_db(database):
# Path: create it, turn into URL
database = os.path.expanduser(database)
if os.path.dirname(database):
os.makedirs(os.path.dirname(database), exist_ok=True)
db_url = 'sqlite:///' + database"Turning database path into URL: %s", db_url)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment