diff options
| author | Barry Warsaw | 2015-04-15 10:05:35 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-15 10:05:35 -0400 |
| commit | 67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c (patch) | |
| tree | 97eca0ae33c97015e4d2fca31e7792e2a929fa8d /src/mailman/commands/eml_confirm.py | |
| parent | 7317b94a0b746f0287ecbc5654ec544ce0112adb (diff) | |
| parent | 3e7dffa750a3e7bb15ac10b711832696554ba03a (diff) | |
| download | mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.tar.gz mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.tar.zst mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.zip | |
Diffstat (limited to 'src/mailman/commands/eml_confirm.py')
| -rw-r--r-- | src/mailman/commands/eml_confirm.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/commands/eml_confirm.py b/src/mailman/commands/eml_confirm.py index a28a3f728..077fab9a6 100644 --- a/src/mailman/commands/eml_confirm.py +++ b/src/mailman/commands/eml_confirm.py @@ -25,7 +25,6 @@ __all__ = [ from mailman.core.i18n import _ from mailman.interfaces.command import ContinueProcessing, IEmailCommand from mailman.interfaces.registrar import IRegistrar -from zope.component import getUtility from zope.interface import implementer @@ -53,7 +52,11 @@ class Confirm: return ContinueProcessing.yes tokens.add(token) results.confirms = tokens - succeeded = getUtility(IRegistrar).confirm(token) + try: + succeeded = (IRegistrar(mlist).confirm(token) is None) + except LookupError: + # The token must not exist in the database. + succeeded = False if succeeded: print(_('Confirmed'), file=results) return ContinueProcessing.yes |
