Skip to content

Commit

Permalink
fix: different way to remove an invalid activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Stablum committed Nov 22, 2021
1 parent cbfb739 commit 87013a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion preprocess/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def parse(page, ti):

for activity_id in remove:
# remove the invalid activity-set
rels_vals[rel].pop(activity_id, None)
try:
del rels_vals[rel][activity_id]
except:
pass # silently ignore the fact that activity_id is not in the data from that rel

large_mp.send(ti, rels_vals)
large_mp.clear_recv(ti, f"download_{page}")
Expand Down

0 comments on commit 87013a4

Please sign in to comment.