[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [depictor/master] Print valid-after times of all dirauths (if they do not match the most recent consensus displayed by one of them). Closes #21100



commit 1bcaa17a633c969eb884e8f94ba7e568c1e55ef4
Author: Tom Ritter <tom@xxxxxxxxx>
Date:   Thu Jan 5 13:37:49 2017 -0600

    Print valid-after times of all dirauths (if they do not match the most recent consensus displayed by one of them). Closes #21100
---
 website.py | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/website.py b/website.py
index cd0bf14..0a2b4fe 100755
--- a/website.py
+++ b/website.py
@@ -146,6 +146,35 @@ class WebsiteWriter:
 		self.site.write(". <i>Note that it takes up to 15 minutes to learn "
 		+ "about new consensus and votes and process them.</i></p>\n")
 
+		wrote_at_least_one_odd_consensus = False
+		for dirauth_nickname in self.known_authorities:
+			if dirauth_nickname not in self.consensuses or \
+				self.consensuses[dirauth_nickname].valid_after != self.consensus.valid_after:
+
+				if wrote_at_least_one_odd_consensus == False:
+					wrote_at_least_one_odd_consensus = True
+
+					self.site.write("<p>Unusual Authorities:</p>\n")
+					self.site.write("<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" summary=\"\">\n"
+					+ "  <colgroup>\n"
+					+ "    <col width=\"160\">\n"
+					+ "    <col width=\"640\">\n"
+					+ "  </colgroup>\n")
+
+				self.site.write("  <tr>\n"
+				+ "    <td>" + dirauth_nickname + "</td>\n")
+
+				if dirauth_nickname not in self.consensuses:
+					self.site.write("    <td class=\"oiv\">Consensus Not Present</td>\n"
+					+ "  </tr>\n")
+				else:
+					self.site.write("    <td>")
+					self.site.write(self.consensuses[dirauth_nickname].valid_after.isoformat().replace("T", " "))
+					self.site.write("</td>")
+
+				self.site.write("  </tr>\n")
+		self.site.write("</table>\n")
+
 	#-----------------------------------------------------------------------------------------
 	def _write_signatures(self):
 		"""

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits