From 49a6b146f826619d7645160c19d309586c1b1d68 Mon Sep 17 00:00:00 2001 From: Nikodemas Tuckus Date: Thu, 29 Feb 2024 17:58:07 +0100 Subject: [PATCH] Dont iterate over None --- cpueff-goweb/spark/cpueff_stepchain_goweb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpueff-goweb/spark/cpueff_stepchain_goweb.py b/cpueff-goweb/spark/cpueff_stepchain_goweb.py index b8e4cf39..8775c407 100644 --- a/cpueff-goweb/spark/cpueff_stepchain_goweb.py +++ b/cpueff-goweb/spark/cpueff_stepchain_goweb.py @@ -71,7 +71,7 @@ def udf_step_extract(row): _jobtype = row['meta_data']['jobtype'] _ts = row['meta_data']['ts'] if 'steps' in row and row['steps']: - for step in row['steps']: + for step in filter(None, row['steps']): if ('name' in step) and step['name'].lower().startswith('cmsrun'): step_res = {'Task': _task_name, 'ts': _ts, 'fwjr_id': _fwjr_id, 'JobType': _jobtype}