Skip to content

Commit

Permalink
fix: missing keys should not error
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Dec 3, 2024
1 parent 26460c8 commit 1d68ab6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion conda_forge_tick/events/push_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ def _react_to_push(name: str, dry_run: bool = False) -> None:
fname = f"node_attrs/{name}.json"

with lazy_json_override_backends(["github"], use_file_cache=False):
attrs_data = copy.deepcopy(LazyJson(fname).data)
try:
attrs_data = copy.deepcopy(LazyJson(fname).data)
except KeyError as e:
if f"{name} not found in hashmap node_attrs" in str(e):
attrs_data = {}
else:
raise e
graph_data = copy.deepcopy(LazyJson("graph.json").data)
gx = nx.node_link_graph(graph_data, edges="links")

Expand Down

0 comments on commit 1d68ab6

Please sign in to comment.