Skip to content

Commit 83bfd61

Browse files
committed
vuln_batch_remediation.py: Auto detect CSV delimiter.
1 parent b1ea6c8 commit 83bfd61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/vuln_batch_remediation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@
8484

8585
def load_remediation_input(remediation_file):
8686
with open(remediation_file, mode='r', encoding="utf-8") as infile:
87-
reader = csv.reader(infile)
87+
dialect = csv.Sniffer().sniff(infile.read(), delimiters=';,')
88+
infile.seek(0)
89+
reader = csv.reader(infile, dialect)
8890
#return {rows[0]:[rows[1],rows[2]] for rows in reader}
8991
return {rows[0]:rows[1:] for rows in reader}
9092

0 commit comments

Comments
 (0)