Skip to content

Commit

Permalink
schema.py: Accept schema as dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Sep 25, 2024
1 parent 9eb749a commit 10b8169
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flattentool/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def __init__(
_("Only one of schema_filename or root_schema_dict should be supplied")
)
if schema_filename:
if schema_filename.startswith("http"):
if isinstance(schema_filename, dict):
self.root_schema_dict = schema_filename
elif schema_filename.startswith("http"):
import requests

r = requests.get(schema_filename)
Expand Down

0 comments on commit 10b8169

Please sign in to comment.