Skip to content

Commit

Permalink
Remove XCCDF 1.1 from profile tool
Browse files Browse the repository at this point in the history
We don't need the XCCDF 1.1 support any more because we only generate XCCDF 1.2.
  • Loading branch information
jan-cerny committed Oct 10, 2022
1 parent 64f8577 commit dd3e9ec
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ssg/build_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from .build_yaml import ProfileWithInlinePolicies
from .xml import ElementTree
from .constants import XCCDF11_NS, XCCDF12_NS, datastream_namespace
from .constants import XCCDF12_NS, datastream_namespace
from .constants import oval_namespace as oval_ns
from .constants import SCE_SYSTEM as sce_ns
from .constants import bash_system as bash_rem_system
Expand Down Expand Up @@ -103,10 +103,7 @@ def __init__(self, filepath, product=""):
with open(filepath, 'r') as xccdf_file:
file_string = xccdf_file.read()
tree = ElementTree.fromstring(file_string)
if tree.tag == "{%s}Benchmark" % XCCDF11_NS:
self.tree = tree
self.xccdf_ns = XCCDF11_NS
elif tree.tag == "{%s}Benchmark" % XCCDF12_NS:
if tree.tag == "{%s}Benchmark" % XCCDF12_NS:
self.tree = tree
self.xccdf_ns = XCCDF12_NS
elif tree.tag == "{%s}data-stream-collection" % datastream_namespace:
Expand Down

0 comments on commit dd3e9ec

Please sign in to comment.