From 3ceec01f0d323963c1eb2813c0cb562d22ad9513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20H=C3=A9zs=C5=91?= Date: Tue, 12 May 2026 16:24:16 +0200 Subject: [PATCH] Fix incorrect condition for JSON report path, default currency for empty cost data, and remove dead except block --- core/utils_aws.py | 5 +---- core/utils_azure.py | 1 + main.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/utils_aws.py b/core/utils_aws.py index c951aaa..eb00bb1 100644 --- a/core/utils_aws.py +++ b/core/utils_aws.py @@ -254,6 +254,7 @@ def build_aws_cost_inventory( json.dump(cost_and_usage, raw_file, indent=4) # Insert structured data into SQLite + currency = "USD" with connect(db_path=db_path) as conn: cursor = conn.cursor() @@ -314,7 +315,3 @@ def build_aws_cost_inventory( except Exception as e: logger.error(f"Error creating AWS cost inventory: {str(e)}", exc_info=True) raise - - except Exception as e: - logger.error(f"Error creating AWS cost inventory: {str(e)}", exc_info=True) - raise diff --git a/core/utils_azure.py b/core/utils_azure.py index 53632f1..efae7b0 100644 --- a/core/utils_azure.py +++ b/core/utils_azure.py @@ -204,6 +204,7 @@ def build_azure_cost_inventory( json.dump(cost_data.as_dict(), raw_file, indent=4) # Insert structured cost data into SQLite + currency = "USD" with connect(db_path=db_path) as conn: cursor = conn.cursor() diff --git a/main.py b/main.py index ed871f0..caf733c 100644 --- a/main.py +++ b/main.py @@ -562,7 +562,7 @@ def run_assessment(config, provider_name): if pdf_report_path: console.print(f"PDF Report: {pdf_report_path}", style="cyan") json_report_path = report_status.get("reports", {}).get("JSON") - if html_report_path: + if json_report_path: console.print(f"JSON Report: {json_report_path}", style="cyan") console.print("-------------------------------------------")