[tor-commits] [depictor/master] Handle the case where a DirAuth does not vote for one of the protocol types.

tom at torproject.org tom at torproject.org
Mon Sep 10 05:54:15 UTC 2018


commit 9c1a27716540d4c545d1772c5bee946a05ca9132
Author: Tom Ritter <tom at ritter.vg>
Date:   Mon Sep 10 00:53:49 2018 -0500

    Handle the case where a DirAuth does not vote for one of the protocol types.
---
 website.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/website.py b/website.py
index 0405099..9b6045a 100755
--- a/website.py
+++ b/website.py
@@ -853,10 +853,13 @@ class WebsiteWriter:
 		s = ""
 		for k in keys:
 			s += k + "="
-			if c and c[k] != v[k]:
+			if c and (k not in v or k not in c or c[k] != v[k]):
 				s += "<span class=\"oiv\">"
-			s += ",".join([str(i) for i in v[k]])
-			if c and c[k] != v[k]:
+			if k in v:
+				s += ",".join([str(i) for i in v[k]])
+			else:
+				s += "(none)"
+			if c and (k not in v or k not in c or c[k] != v[k]):
 				s += "</span>"
 			s += " "
 		return s



More information about the tor-commits mailing list