-
Notifications
You must be signed in to change notification settings - Fork 235
oscal-content-validator.py utility has SyntaxWarnings #1025
Copy link
Copy link
Closed
Labels
Milestone
Description
Describe the bug
While validating with oscal-content-validator.py, I see:
/home/bradh/devsecops/OSCAL/src/utils/util/oscal-content-validator.py:23: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is "json":
/home/bradh/devsecops/OSCAL/src/utils/util/oscal-content-validator.py:45: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is 'json':
/home/bradh/devsecops/OSCAL/src/utils/util/oscal-content-validator.py:47: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is 'xml':
Who is the bug affecting?
Probably everyone using a new-ish version of Python.
What is affected by this bug?
Minor effect - its noise that obscures the actual validation results.
When does this occur?
When using the validator. It probably affects every run.
How do we replicate the issue?
- Invoke it:
./src/utils/util/oscal-content-validator.py -h
- See:
./src/utils/util/oscal-content-validator.py:23: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is "json":
./src/utils/util/oscal-content-validator.py:45: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is 'json':
./src/utils/util/oscal-content-validator.py:47: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ftype is 'xml':
usage: oscal-content-validator.py [-h] -s OSCAL_SCHEMA -f OSCAL_FILE
optional arguments:
-h, --help show this help message and exit
-s OSCAL_SCHEMA, --oscal-schema OSCAL_SCHEMA
An OSCAL schema file.
-f OSCAL_FILE, --oscal-file OSCAL_FILE
An OSCAL data file.
Expected behavior (i.e. solution)
No SyntaxWarning output
Other Comments
Will send a PR.
Reactions are currently unavailable