Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
fix: 'type' is not a required value for the schema (#64)
Browse files Browse the repository at this point in the history
* only print describe if not none

* type is not a required field in schema
  • Loading branch information
jjmachan committed Dec 27, 2021
1 parent 7b69c8e commit 747d5d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bentoctl/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def describe(file):
"""
try:
info_json = describe_deployment(deployment_config_path=file)
pprint(info_json)
if info_json is not None:
pprint(info_json)
except BentoctlException as e:
e.show()
sys.exit(1)
Expand Down
8 changes: 4 additions & 4 deletions bentoctl/deployment_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def remove_help_message(schema):
for field, rules in schema.items():
if "help_message" in rules:
del rules["help_message"]
if rules["type"] == "dict":
rules["schema"] = remove_help_message(rules["schema"])
elif rules["type"] == "list":
rules["schema"] = remove_help_message({"list_item": rules["schema"]})[
if rules.get("type") == "dict":
rules["schema"] = remove_help_message(rules.get("schema"))
elif rules.get("type") == "list":
rules["schema"] = remove_help_message({"list_item": rules.get("schema")})[
"list_item"
]
schema[field] = rules
Expand Down

0 comments on commit 747d5d6

Please sign in to comment.