Skip to content

Commit

Permalink
Dont iterate over None
Browse files Browse the repository at this point in the history
  • Loading branch information
nikodemas committed Feb 29, 2024
1 parent 5ae144f commit 49a6b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpueff-goweb/spark/cpueff_stepchain_goweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 49a6b14

Please sign in to comment.