Passed
Push — master ( ea7c4a...d61422 )
by Matěj
01:18 queued 12s
created

add_stig_references.main()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 0
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
#!/usr/bin/env python2
2
3
from __future__ import print_function
4
5
import argparse
6
import ssg.build_stig
7
8
9
def parse_args():
10
    parser = argparse.ArgumentParser(description='Add STIG references to XCCDF files.')
11
    parser.add_argument("--disa-stig", help="DISA STIG Reference XCCDF file",
12
                        dest="reference")
13
    parser.add_argument("--unlinked-xccdf", help="unlinked SSG XCCDF file",
14
                        dest="destination")
15
    return parser.parse_args()
16
17
18
def main():
19
    args = parse_args()
20
21
    target_root = ssg.build_stig.add_references(args.reference, args.destination)
22
    target_root.write(args.destination)
23
24
25
if __name__ == "__main__":
26
    main()
27