Skip to content

Commit

Permalink
Fix skip invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Mar 7, 2024
1 parent 72a3077 commit 1973d35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7,510 deletions.
11 changes: 9 additions & 2 deletions src/packse/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,20 @@ def inspect(
scenarios_by_path[target] = load_scenarios(target)
except Exception as exc:
invalid = InvalidScenario(target, reason=str(exc))
print(f"Skipping file: {invalid}")
if skip_invalid:
print(f"Skipping file: {invalid}")
else:
raise invalid
else:
try:
logger.debug("Loading %s", target)
scenarios_by_path[target] = load_scenarios(target)
except Exception as exc:
raise InvalidScenario(target, reason=str(exc)) from exc
invalid = InvalidScenario(target, reason=str(exc))
if skip_invalid:
print(f"Skipping file: {invalid}")
else:
raise invalid

# Collect a JSON-compatible representation for each scenario
result = {"scenarios": []}
Expand Down
Loading

0 comments on commit 1973d35

Please sign in to comment.