Skip to content

Commit

Permalink
utils: fix SyntaxWarning on content validator (#1026)
Browse files Browse the repository at this point in the history
Resolves #1025
  • Loading branch information
bradh authored Sep 27, 2021
1 parent 1282467 commit 83615b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/util/oscal-content-validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _get_oscal_file_type(filename):

def read_file(filename, ftype):
with io.open(filename, 'r', encoding="utf-8") as f:
if ftype is "json":
if ftype == "json":
filedata = json.load(f)
else:
filedata = f.read()
Expand All @@ -42,9 +42,9 @@ def oscal_validator(oscal_schema, oscal_data):
schema, stype = read_file(oscal_schema, _get_oscal_file_type(oscal_schema))
data, ftype = read_file(oscal_data, _get_oscal_file_type(oscal_data))

if ftype is 'json':
if ftype == 'json':
validate(data, schema)
if ftype is 'xml':
if ftype == 'xml':
xmlschema.validate(data, schema)


Expand Down

0 comments on commit 83615b8

Please sign in to comment.