Skip to content

Commit

Permalink
Refactor build_yaml
Browse files Browse the repository at this point in the history
Clean up imports and fix small problems.
  • Loading branch information
evgenyz committed Nov 24, 2022
1 parent ec13f90 commit 9903e46
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ssg/build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


import ssg.build_remediations
from .build_cpe import CPEDoesNotExist, CPEALLogicalTest, CPEALFactRef, ProductCPEs
from .build_cpe import CPEALLogicalTest, CPEALFactRef, ProductCPEs
from .constants import (XCCDF12_NS,
OSCAP_BENCHMARK,
OSCAP_GROUP,
Expand Down Expand Up @@ -40,8 +40,7 @@
from .yaml import DocumentationNotComplete, open_and_macro_expand
from .utils import required_key, mkdir_p

from .xml import ElementTree as ET, add_xhtml_namespace, register_namespaces, parse_file
from .shims import unicode_func
from .xml import ElementTree as ET, register_namespaces, parse_file
import ssg.build_stig

from .entities.common import add_sub_element, make_items_product_specific, \
Expand Down Expand Up @@ -280,7 +279,7 @@ def process_input_dict(cls, input_contents, env_yaml, product_cpes):
return data

def represent_as_dict(self):
data = super(Benchmark, cls).represent_as_dict()
data = super(Benchmark, self).represent_as_dict()
data["rear-matter"] = data["rear_matter"]
del data["rear_matter"]

Expand Down Expand Up @@ -678,9 +677,9 @@ class Rule(XCCDFEntity, Templatable):
inherited_cpe_platform_names=lambda: set(),
bash_conditional=lambda: None,
fixes=lambda: dict(),
** XCCDFEntity.KEYS,
** Templatable.KEYS
**XCCDFEntity.KEYS,
)
KEYS.update(**Templatable.KEYS)

MANDATORY_KEYS = {
"title",
Expand Down

0 comments on commit 9903e46

Please sign in to comment.