mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename InterruptedError => QueryInterrupted, closes #490
This commit is contained in:
parent
edb36629e7
commit
bd4dbc8519
7 changed files with 20 additions and 20 deletions
|
|
@ -26,7 +26,7 @@ from .renderer import json_renderer
|
|||
from .database import Database
|
||||
|
||||
from .utils import (
|
||||
InterruptedError,
|
||||
QueryInterrupted,
|
||||
Results,
|
||||
escape_css_string,
|
||||
escape_sqlite,
|
||||
|
|
@ -346,7 +346,7 @@ class Datasette:
|
|||
)
|
||||
try:
|
||||
results = await self.execute(database, sql, list(set(values)))
|
||||
except InterruptedError:
|
||||
except QueryInterrupted:
|
||||
pass
|
||||
else:
|
||||
for id, value in results:
|
||||
|
|
@ -504,7 +504,7 @@ class Datasette:
|
|||
truncated = False
|
||||
except sqlite3.OperationalError as e:
|
||||
if e.args == ("interrupted",):
|
||||
raise InterruptedError(e, sql, params)
|
||||
raise QueryInterrupted(e, sql, params)
|
||||
if log_sql_errors:
|
||||
print(
|
||||
"ERROR: conn={}, sql = {}, params = {}: {}".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue