Skip to content

Commit

Permalink
Replace pyyaml library with ruamel.yaml
Browse files Browse the repository at this point in the history
This was done to address the concern raised in the PR - usnistgov#1091 (comment)
  • Loading branch information
guyzyl committed Jan 19, 2022
1 parent 178b5f9 commit cda97d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/utils/util/oscal-content-validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import argparse
from jsonschema import validate
import xmlschema
import yaml
from ruamel.yaml import YAML


def _get_oscal_file_type(filename):
Expand All @@ -25,6 +25,7 @@ def read_file(filename, ftype):
if ftype == "json":
filedata = json.load(f)
if ftype == "yaml":
yaml = YAML()
filedata = yaml.load(f)
else:
filedata = f.read()
Expand Down
2 changes: 1 addition & 1 deletion src/utils/util/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jsonschema
xmlschema
pyyaml
ruamel.yaml

0 comments on commit cda97d0

Please sign in to comment.