From 1fe3e56cc7a028accf6d15275701b5652f6891d0 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Thu, 9 Mar 2017 17:35:55 +0000 Subject: [PATCH] Revert "enable the email policy" We're getting Traceback (most recent call last): File "/srv/ubuntu-archive/proposed-migration/code/b2/britney2/policies/email.py", line 171, in apply_policy_impl with smtplib.SMTP('localhost') as smtp: AttributeError: __exit__ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 2892, in Britney().main() File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 2860, in main self.write_excuses() File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1680, in write_excuses if should_upgrade_src(pkg, 'unstable'): File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1585, in should_upgrade_src v = policy.apply_policy(policy_info, suite, src, source_t, source_u, excuse) File "/srv/ubuntu-archive/proposed-migration/code/b2/britney2/policies/policy.py", line 103, in apply_policy return self.apply_policy_impl(pinfo, suite, source_name, source_data_tdist, source_data_srcdist, excuse) File "/srv/ubuntu-archive/proposed-migration/code/b2/britney2/policies/email.py", line 176, in apply_policy_impl except ConnectionRefusedError as err: NameError: global name 'ConnectionRefusedError' is not defined on the production machine, which is currently running Python 3.2. It seems like smtplib.SMTP isn't a context manager in 3.2, and also ConnectionRefusedError doesn't exist there (it raises socket.error instead). Robert's going to fix this, but for now let's go back to dry-run. This reverts commit c05b6871851143efe5e2f2388b52544ecf3f7a32. --- britney.conf | 2 +- britney_nobreakall.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/britney.conf b/britney.conf index e8e5864..d859f0d 100644 --- a/britney.conf +++ b/britney.conf @@ -102,4 +102,4 @@ ADT_PPAS = ADT_SHARED_RESULTS_CACHE = # email uploaders for stuck uploads -EMAIL_ENABLE = yes +EMAIL_ENABLE = dry-run diff --git a/britney_nobreakall.conf b/britney_nobreakall.conf index 954f84c..02e3b04 100644 --- a/britney_nobreakall.conf +++ b/britney_nobreakall.conf @@ -100,4 +100,4 @@ ADT_PPAS = ADT_SHARED_RESULTS_CACHE = # email uploaders for stuck uploads -EMAIL_ENABLE = yes +EMAIL_ENABLE = dry-run