From 409 warnings down to 52 warnings.

By closing unclosed database connections.

Refs #2614
This commit is contained in:
Simon Willison 2025-12-12 22:38:04 -08:00
commit f02484c3de
14 changed files with 75 additions and 27 deletions

View file

@ -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(