[or-cvs] [torflow/master 83/92] snakeinspector: mail_tls requires Python 2.6
mikeperry at torproject.org
mikeperry at torproject.org
Sat Aug 21 05:14:01 UTC 2010
Author: John M. Schanck <john at anomos.info>
Date: Sun, 15 Aug 2010 01:07:45 -0400
Subject: snakeinspector: mail_tls requires Python 2.6
Commit: 2ae2d3db57f61f68baca3c1e2a02a84365ce34e9
---
NetworkScanners/ExitAuthority/snakeinspector.py | 5 ++++-
NetworkScanners/ExitAuthority/soat_config.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/NetworkScanners/ExitAuthority/snakeinspector.py b/NetworkScanners/ExitAuthority/snakeinspector.py
index 9a86e7e..a03394c 100755
--- a/NetworkScanners/ExitAuthority/snakeinspector.py
+++ b/NetworkScanners/ExitAuthority/snakeinspector.py
@@ -157,7 +157,10 @@ def send_mail(fro, to, subject, text, files=[]):
try:
if mail_tls:
- smtp = smtplib.SMTP_SSL(host=mail_server)
+ if sys.version_info >= (2, 6):
+ smtp = smtplib.SMTP_SSL(host=mail_server)
+ else:
+ print "mail_tls requires Python >= 2.6"
else:
smtp = smtplib.SMTP(host=mail_server)
if mail_starttls:
diff --git a/NetworkScanners/ExitAuthority/soat_config.py b/NetworkScanners/ExitAuthority/soat_config.py
index 255301c..850856a 100644
--- a/NetworkScanners/ExitAuthority/soat_config.py
+++ b/NetworkScanners/ExitAuthority/soat_config.py
@@ -55,7 +55,7 @@ mail_server = "127.0.0.1"
mail_auth = False
mail_user = "user at example.com"
mail_password = "password"
-mail_tls = False
+mail_tls = False # Requires Python >= 2.6
mail_starttls = False
# What percentage of tested nodes must disagree with our local fetches before
--
1.7.1
More information about the tor-commits
mailing list