Skip to content

Commit c5ea428

Browse files
committed
Address returning CSV reader on closed file
1 parent bc46b75 commit c5ea428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/shared/codeql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def decode_results(self, database_path: Path, query_path: Path, **options: str)
116116
raise CodeQLError(
117117
f"Could not read the output of the query {query_path}", stdout=result.stdout, stderr=result.stderr, returncode=result.returncode)
118118
with open(temp_file) as tmp:
119-
return csv.reader(tmp)
119+
return list(csv.reader(tmp))
120120

121121
def generate_query_help(self, query_help_path: Path, output: Path, format : str = "markdown", **options: str) -> None:
122122
command = ['codeql', 'generate', 'query-help']

0 commit comments

Comments
 (0)