Skip to content

Commit eeda020

Browse files
fix arg issue + error handling
1 parent 460b085 commit eeda020

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

utils/oscap-docker.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ if __name__ == '__main__':
121121
except (ValueError, RuntimeError) as e:
122122
raise e
123123
sys.exit(255)
124+
except(FileNotFoundError) as e:
125+
sys.stderr.write("Target {0} not found.\n".format(target))
126+
sys.exit(255)
124127
except Exception as exc:
125128
traceback.print_exc(file=sys.stdout)
126129
sys.stderr.write("!!! WARNING !!! This software has crashed, so you should "

utils/oscap_docker_python/oscap_docker_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _scan(self, chroot, target, scan_args):
164164
'''
165165

166166
name, conf = self._get_target_name_and_config(target)
167-
return oscap_chroot(chroot, target, scan_args, name,
167+
return oscap_chroot(chroot, self.oscap_binary, scan_args, name,
168168
conf.get("Env", []) or [])
169169

170170
def resolve_image(self, image):

0 commit comments

Comments
 (0)