mirror of
https://github.com/simonw/datasette.git
synced 2026-09-28 12:54:10 +02:00
From 409 warnings down to 52 warnings.
By closing unclosed database connections. Refs #2614
This commit is contained in:
parent
9c164572d3
commit
f02484c3de
14 changed files with 75 additions and 27 deletions
|
|
@ -615,7 +615,9 @@ def serve(
|
|||
for file in file_paths:
|
||||
if not pathlib.Path(file).exists():
|
||||
if create:
|
||||
sqlite3.connect(file).execute("vacuum")
|
||||
conn = sqlite3.connect(file)
|
||||
conn.execute("vacuum")
|
||||
conn.close()
|
||||
else:
|
||||
raise click.ClickException(
|
||||
"Invalid value for '[FILES]...': Path '{}' does not exist.".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue