Try and fix problem with platform not existing
This commit is contained in:
parent
67a0d00bfe
commit
62728c3449
|
@ -19,8 +19,11 @@ for new_relay in relays:
|
||||||
if datetime.datetime.strptime(new_relay["first_seen"], "%Y-%m-%d %H:%M:%S") > (datetime.datetime.utcnow() - datetime.timedelta(hours=1)):
|
if datetime.datetime.strptime(new_relay["first_seen"], "%Y-%m-%d %H:%M:%S") > (datetime.datetime.utcnow() - datetime.timedelta(hours=1)):
|
||||||
exit = "no"
|
exit = "no"
|
||||||
eol = "no"
|
eol = "no"
|
||||||
|
if "platform" in new_relay:
|
||||||
if not re.search("0.3.5|0.4.5|0.4.6|0.4.7", new_relay["platform"], re.IGNORECASE):
|
if not re.search("0.3.5|0.4.5|0.4.6|0.4.7", new_relay["platform"], re.IGNORECASE):
|
||||||
eol = "yes"
|
eol = "yes"
|
||||||
|
else:
|
||||||
|
eol = "N/A"
|
||||||
if new_relay["exit_policy"][0] != "reject *:*":
|
if new_relay["exit_policy"][0] != "reject *:*":
|
||||||
exit = "yes"
|
exit = "yes"
|
||||||
exitStatus += "\"" + new_relay["nickname"] + "\", fingerprint: " + new_relay["fingerprint"] + ", EOL: " + eol + ", effective family: " + str(len(new_relay["effective_family"])-1) + "; https://metrics.torproject.org/rs.html#search/" + new_relay["fingerprint"] + "\n"
|
exitStatus += "\"" + new_relay["nickname"] + "\", fingerprint: " + new_relay["fingerprint"] + ", EOL: " + eol + ", effective family: " + str(len(new_relay["effective_family"])-1) + "; https://metrics.torproject.org/rs.html#search/" + new_relay["fingerprint"] + "\n"
|
||||||
|
|
Loading…
Reference in a new issue