[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [depictor/master] Handle some error conditions in Shared Random parsing
commit eb685c30e23230e6de5767efdc4b7bb6d1c93231
Author: Tom Ritter <tom@xxxxxxxxx>
Date: Mon Jan 9 07:03:35 2017 -0600
Handle some error conditions in Shared Random parsing
---
website.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/website.py b/website.py
index 6b8e28d..fa508ac 100755
--- a/website.py
+++ b/website.py
@@ -607,8 +607,8 @@ class WebsiteWriter:
s = "["
s += "V:" + str(sr.version) + " "
s += "A:" + str(sr.algorithm) + " "
- s += "C:" + sr.commit + " "
- s += "R:" + sr.reveal
+ s += "C:" + sr.commit if sr.commit else "<span class=\"oiv\">(Empty)</span>"
+ s += "R:" + sr.reveal if sr.reveal else "<span class=\"oiv\">(Empty)</span>"
return s + "]"
def _write_shared_random(self):
"""
@@ -638,10 +638,10 @@ class WebsiteWriter:
cur_error = ""
if vote.directory_authorities[0].shared_randomness_previous_reveal_count != self.consensus.shared_randomness_previous_reveal_count or \
vote.directory_authorities[0].shared_randomness_previous_value != self.consensus.shared_randomness_previous_value:
- prev_error = "oiv"
+ prev_error = " class=\"oiv\""
if vote.directory_authorities[0].shared_randomness_current_reveal_count != self.consensus.shared_randomness_current_reveal_count or \
vote.directory_authorities[0].shared_randomness_current_value != self.consensus.shared_randomness_current_value:
- cur_error = "oiv"
+ cur_error = " class=\"oiv\""
self.site.write(" <tr>\n"
+ " <td>" + dirauth_nickname + "</td>\n"
+ " <td>Previous</td>\n"
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits