commit b34700fdd2556fb6106d18d9e2a0bb928aa42df2 Author: hiro hiro@torproject.org Date: Mon Sep 30 12:33:19 2019 +0200
Update check service script --- scripts/check_service | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/check_service b/scripts/check_service index ed7f6a6..9a66053 100644 --- a/scripts/check_service +++ b/scripts/check_service @@ -66,7 +66,7 @@ def test_email_from_gmail(password):
- + mail.close() return WARNING, "No emails from gettor found"
except Exception as e: @@ -82,11 +82,11 @@ def send_email_from_gmail(password): """ % (sent_from, ", ".join(sent_to), subject, body)
try: - server = smtplib.SMTP_SSL('smtp.gmail.com', 465) - server.ehlo() - server.login(sent_from, password) - server.sendmail(sent_from, sent_to, email_text) - server.close() + mail = smtplib.SMTP_SSL('smtp.gmail.com', 465) + mail.ehlo() + mail.login(sent_from, password) + mail.sendmail(sent_from, sent_to, email_text) + mail.close() except Exception as e: return UNKNOWN, str(e)
tor-commits@lists.torproject.org