Skip to content

Commit

Permalink
[bugfix] replace config by conf
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueDevinci committed Nov 2, 2019
1 parent e1e113e commit f76e317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions utils/oscap-docker.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import argparse
from oscap_docker_python.oscap_docker_util import OscapAtomicScan,\
OscapDockerScan, isAtomicLoaded
import docker
import traceback
import sys
from requests import exceptions

Expand Down Expand Up @@ -98,11 +99,11 @@ if __name__ == '__main__':
else:
parser.print_help()
sys.exit(2)

else: # without atomic
if args.noatomic:
print("Running oscap-docker with native docker api instead of atomic ...")

ODS = OscapDockerScan(args.scan_target, args.is_image, args.oscap_binary)
if args.action == "scan":
rc = OscapDockerScan.scan(ODS, leftover_args)
Expand All @@ -112,7 +113,7 @@ if __name__ == '__main__':
else:
parser.print_help()
sys.exit(2)

except ValueError as e:
raise e
sys.exit(255)
Expand Down
2 changes: 1 addition & 1 deletion utils/oscap_docker_python/oscap_docker_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def oscap_chroot(self, chroot_path, target, *oscap_args):
os.environ["OSCAP_PROBE_OS_VERSION"] = platform.release()
name, conf = self._get_target_name_and_config(target)
os.environ["OSCAP_EVALUATION_TARGET"] = name
for var in config.get("Env", []):
for var in conf.get("Env", []):
vname, val = var.split("=", 1)
os.environ["OSCAP_OFFLINE_" + vname] = val
cmd = [self.oscap_binary] + [x for x in oscap_args]
Expand Down

0 comments on commit f76e317

Please sign in to comment.