Skip to content

Commit

Permalink
validate using version from file in commands.edit
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 16, 2023
1 parent a549e49 commit 45728ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asdf/commands/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def edit(path):
# read the tagged tree (which also checks if the YAML is valid)
tagged_tree = util.load_yaml(io.BytesIO(new_content), tagged=True)
# validate the tagged tree
schema.validate(tagged_tree, reading=True)
ctx = AsdfFile(version=new_asdf_version)
schema.validate(tagged_tree, ctx=ctx, reading=True)
except yaml.YAMLError as e:
print("Error: failed to parse updated YAML:")
print_exception(e)
Expand Down

0 comments on commit 45728ca

Please sign in to comment.