From 54b7100dea5a6b2db74b2ca8900b4feb620a6138 Mon Sep 17 00:00:00 2001 From: Will Murphy Date: Wed, 18 Sep 2024 14:46:48 -0400 Subject: [PATCH] chore: clean up false start Signed-off-by: Will Murphy --- src/yardstick/capture.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/yardstick/capture.py b/src/yardstick/capture.py index 61389d6..2fb7bb6 100644 --- a/src/yardstick/capture.py +++ b/src/yardstick/capture.py @@ -122,18 +122,7 @@ def one( if request.profile: profile_obj = profiles.get(scan_config.tool_name, {}).get(request.profile, {}) if not profile_obj: - profile_obj = profiles.get(scan_config.tool_name.replace("-", "_"), {}).get( - request.profile, {} - ) - - if not profile_obj: - profile_obj = profiles.get(scan_config.tool_name.replace("_", "-"), {}).get( - request.profile, {} - ) - if not profile_obj: - raise RuntimeError( - f"no profile found for tool {scan_config.tool_name} profile {request.profile}, have {profiles}" - ) + raise RuntimeError(f"no profile found for tool {scan_config.tool_name}") match_results, raw_json = run_scan(config=scan_config, profile=profile_obj) store.scan_result.save(