Skip to content

Commit 7039d21

Browse files
genReport: fix DRC violation type parsing
str.strip(chars) strips a character set, not a literal prefix. Use split() to correctly extract the violation type name. Signed-off-by: Ashnaa Seth <ashnaaseth2325@gmail.com> Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
1 parent 7b9c592 commit 7039d21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flow/util/genReport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def write_summary():
295295
with open(drc_report_file, "r") as file_:
296296
for line_ in file_.readlines():
297297
if "violation type:" in line_:
298-
type_ = line_.strip("violation type:").strip()
298+
type_ = line_.split("violation type:", 1)[1].strip()
299299
if type_ in d["drcs"].keys():
300300
d["drcs"][type_] += 1
301301
else:

0 commit comments

Comments
 (0)