Skip to content

Commit

Permalink
Add debugging try/except
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Dec 4, 2024
1 parent 709bb07 commit 28f6845
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions trestle/tasks/csv_to_oscal_cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,9 +1577,12 @@ def __init__(self, csv_path: pathlib.Path) -> None:
"""Initialize."""
self._csv = []
with open(csv_path, 'r', newline='') as f:
csv_reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_MINIMAL)
for row in csv_reader:
self._csv.append(row)
try:
csv_reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_MINIMAL)
for row in csv_reader:
self._csv.append(row)
except Exception:
raise RuntimeError(f'row: {row}')
self._undecorate_header()
self._verify()
self._csv_rules_map = {}
Expand Down

0 comments on commit 28f6845

Please sign in to comment.