Skip to content

Commit

Permalink
Bug fix for unintentional variable section requirement. (#256)
Browse files Browse the repository at this point in the history
Closes #255. A bug fix that corrects an unintentional assumption that the variable section in a specification will always exist.
  • Loading branch information
ben-bay committed Apr 30, 2020
1 parent 60d5175 commit aeda12f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion maestrowf/datastructures/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"properties": {
"variables": {"type": "object"},
"labels": {"type": "object"},
"sources": {"type": "object"},
"sources": {"type": "array"},
"dependencies": {
"type": "object",
"properties": {
Expand Down
2 changes: 2 additions & 0 deletions maestrowf/datastructures/yamlspecification.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ def _verify_variables(self):
:returns: A set of keys encountered in the variables section.
"""
keys_seen = set()
if "variables" not in self.environment:
return keys_seen
for key, value in self.environment["variables"].items():
logger.debug("Verifying %s...", key)
if not key:
Expand Down

0 comments on commit aeda12f

Please sign in to comment.