Skip to content

Commit f76e317

Browse files
[bugfix] replace config by conf
1 parent e1e113e commit f76e317

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

utils/oscap-docker.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import argparse
2424
from oscap_docker_python.oscap_docker_util import OscapAtomicScan,\
2525
OscapDockerScan, isAtomicLoaded
2626
import docker
27+
import traceback
2728
import sys
2829
from requests import exceptions
2930

@@ -98,11 +99,11 @@ if __name__ == '__main__':
9899
else:
99100
parser.print_help()
100101
sys.exit(2)
101-
102+
102103
else: # without atomic
103104
if args.noatomic:
104105
print("Running oscap-docker with native docker api instead of atomic ...")
105-
106+
106107
ODS = OscapDockerScan(args.scan_target, args.is_image, args.oscap_binary)
107108
if args.action == "scan":
108109
rc = OscapDockerScan.scan(ODS, leftover_args)
@@ -112,7 +113,7 @@ if __name__ == '__main__':
112113
else:
113114
parser.print_help()
114115
sys.exit(2)
115-
116+
116117
except ValueError as e:
117118
raise e
118119
sys.exit(255)

utils/oscap_docker_python/oscap_docker_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def oscap_chroot(self, chroot_path, target, *oscap_args):
180180
os.environ["OSCAP_PROBE_OS_VERSION"] = platform.release()
181181
name, conf = self._get_target_name_and_config(target)
182182
os.environ["OSCAP_EVALUATION_TARGET"] = name
183-
for var in config.get("Env", []):
183+
for var in conf.get("Env", []):
184184
vname, val = var.split("=", 1)
185185
os.environ["OSCAP_OFFLINE_" + vname] = val
186186
cmd = [self.oscap_binary] + [x for x in oscap_args]

0 commit comments

Comments
 (0)