Skip to content

Commit

Permalink
english
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Jan 9, 2024
1 parent 0cfc1e4 commit 7a2a83f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scenario/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,14 +943,15 @@ def jsonpatch_delta(self, other: "State"):


def _is_valid_charmcraft_25_metadata(meta: Dict[str, Any]):
# Check whether the metadata has the expected mandatory fields
# Check whether this dict has the expected mandatory metadata fields according to the
# charmcraft >2.5 charmcraft.yaml schema
if (config_type := meta.get("type")) != "charm":
logger.debug(
f"Not a charm: charmcraft yaml config ``.type`` is {config_type!r}.",
)
return False
if not all(field in meta for field in {"name", "summary", "description"}):
logger.debug("not a charm: charmcraft yaml misses some required")
logger.debug("Not a charm: charmcraft yaml misses some required fields")
return False
return True

Expand Down

0 comments on commit 7a2a83f

Please sign in to comment.