Skip to content

Commit

Permalink
Fix type error (#4268)
Browse files Browse the repository at this point in the history
  • Loading branch information
cidrblock authored Jul 31, 2024
1 parent c670360 commit 76cfdd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/molecule/model/schema_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def validate(c): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201
),
):
wrong_driver_name = str(exc.message.split()[0])
driver_name_err_msg = exc.schema["messages"]["anyOf"]
if isinstance(exc.schema, dict):
driver_name_err_msg = exc.schema["messages"]["anyOf"]
else:
driver_name_err_msg = "is not a valid driver name"
result.append(f"{wrong_driver_name} {driver_name_err_msg}")
else:
result.append(exc.message)
Expand Down

0 comments on commit 76cfdd2

Please sign in to comment.