mirror of
https://github.com/torproject/community.git
synced 2024-11-26 19:20:25 +00:00
avoid crashing build if metrics is missing cw data
This commit is contained in:
parent
a500633866
commit
da14b84743
@ -35,6 +35,9 @@ class CommunityGoodBadIspsPlugin(Plugin):
|
||||
if "as" not in relay.keys():
|
||||
warnings.warn("Missing 'as' key for relay %s" % relay["nickname"])
|
||||
break
|
||||
if "consensus_weight_fraction" not in relay.keys():
|
||||
warnings.warn("Missing 'consensus_weight_fraction' key for relay %s" % relay["nickname"])
|
||||
break
|
||||
asn = relay["as"]
|
||||
if asn not in asn_cw:
|
||||
asn_cw[asn] = 0
|
||||
|
Loading…
Reference in New Issue
Block a user