Skip to content

Commit aa8d641

Browse files
committed
bugfix: fix failing tests
1 parent 4576548 commit aa8d641

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dojo/tools/openvas/parser_v2/csv_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
def get_findings_from_csv(file, test) -> list[Finding]:
2121
"""Returns list of findings as defectdojo factory contract expects"""
2222
dupes = {}
23-
file = io.TextIOWrapper(file, encoding="utf-8")
23+
if not isinstance(file, io.TextIOWrapper):
24+
file = io.TextIOWrapper(file, encoding="utf-8")
2425
csv_reader = csv.reader(file, delimiter=",", quotechar='"')
2526
column_names = [column_name.lower() for column_name in next(csv_reader) if column_name]
2627

0 commit comments

Comments
 (0)