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 - #1091 (comment)
  • Loading branch information
guyzyl authored and aj-stein-nist committed Jan 26, 2022
1 parent 78cde8f commit 82e4bca
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 82e4bca

Please sign in to comment.