Skip to content

Commit 583c7dd

Browse files
author
patched.codes[bot]
committed
Patched patchwork/common/tools/csvkit_tool.py
1 parent 300a4ed commit 583c7dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

patchwork/common/tools/csvkit_tool.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ def execute(self, files: list[str], query: str) -> str:
118118
if db_path.is_file():
119119
with sqlite3.connect(str(db_path)) as conn:
120120
for file in files:
121+
table_name = file.removesuffix('.csv')
121122
res = conn.execute(
122-
f"SELECT 1 from {file.removesuffix('.csv')}",
123+
"SELECT 1 FROM ?", (table_name,)
123124
)
124125
if res.fetchone() is None:
125126
files_to_insert.append(file)

0 commit comments

Comments
 (0)