From 8acc195cd562add9a9c2630d6f8b5472c491130c Mon Sep 17 00:00:00 2001 From: "Kamil Mankowski (kam193)" Date: Thu, 12 Sep 2024 23:57:20 +0200 Subject: [PATCH] Fix handling column 0 in CSV files --- badlist/update_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/badlist/update_server.py b/badlist/update_server.py index 4125d94..ec8f17d 100644 --- a/badlist/update_server.py +++ b/badlist/update_server.py @@ -218,24 +218,24 @@ def prepare_item(bl_item): # Skip row continue - references = [] if not source_cfg.get("reference") else [row[source_cfg["reference"]]] + references = [] if source_cfg.get("reference") is None else [row[source_cfg["reference"]]] # Get malware family malware_family = ( sanitize_data(row[source_cfg["malware_family"]], type="malware_family") - if source_cfg.get("malware_family") + if source_cfg.get("malware_family") is not None else [] ) # Get attribution attribution = ( sanitize_data(row[source_cfg["attribution"]], type="attribution") - if source_cfg.get("attribution") + if source_cfg.get("attribution") is not None else [] ) campaign = ( sanitize_data(row[source_cfg["campaign"]], type="campaign", validate=False) - if source_cfg.get("campaign") + if source_cfg.get("campaign") is not None else [] )