Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update to show XML content with problem #12132

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ssg/oval_object_model/oval_shorthand.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ def _get_xml_element_from_string_shorthand(shorthand):
valid_oval_xml_string = "{}{}{}".format(oval_header, shorthand, oval_footer).encode(
"utf-8"
)
xml_element = ElementTree.fromstring(valid_oval_xml_string)
try:
xml_element = ElementTree.fromstring(valid_oval_xml_string)
except Exception as e:
print(f'{e}. Check the content below:')
print(valid_oval_xml_string)
return xml_element.findall("./{%s}def-group/*" % OVAL_NAMESPACES.definition)


Expand Down
Loading