[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Stacktrace when tor26 lacks authority flag
commit a7989448d27fc6272640f2691852e2202d25efc5
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Jun 15 12:26:01 2018 -0700
Stacktrace when tor26 lacks authority flag
Oops, need to be a tad more defensive here...
Traceback (most recent call last):
File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 976, in <module>
main()
File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 258, in main
issues += run_checks(consensuses, votes)
File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 352, in run_checks
issues = checker(latest_consensus, consensuses, votes)
File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 640, in has_authority_flag
seen_authorities.remove('tor26')
KeyError: 'tor26'
---
consensus_health_checker.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index f152773..5ef660a 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -637,7 +637,8 @@ def has_authority_flag(latest_consensus, consensuses, votes):
if Flag.AUTHORITY in desc.flags:
seen_authorities.add(desc.nickname)
- seen_authorities.remove('tor26')
+ if 'tor26' in seen_authorities:
+ seen_authorities.remove('tor26')
known_authorities = set(DIRECTORY_AUTHORITIES.keys())
missing_authorities = known_authorities.difference(seen_authorities)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits