diff options
author | Mark Sapiro <mark@msapiro.net> | 2015-02-28 23:05:56 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2015-02-28 23:05:56 -0800 |
commit | 22fb785f196e2bcf667193e64bf5e5af5351eada (patch) | |
tree | 037b0886469c47d29ff6a5c910ded682bbd4da6d /Mailman/Queue/CommandRunner.py | |
parent | 78e50173ba79164b041175427357db5fa5bde060 (diff) | |
download | mailman2-22fb785f196e2bcf667193e64bf5e5af5351eada.tar.gz mailman2-22fb785f196e2bcf667193e64bf5e5af5351eada.tar.xz mailman2-22fb785f196e2bcf667193e64bf5e5af5351eada.zip |
Fixed a bug in CommandRunner that threw an uncaught KeyError if
the input to the list-request address contained a command word
terminated by a period.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Queue/CommandRunner.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index d25fe87e..6fbcac2a 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2014 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2015 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """-request robot command queue runner.""" @@ -132,7 +133,8 @@ class Results: __import__(modname) handler = sys.modules[modname] # ValueError can be raised if cmd has dots in it. - except (ImportError, ValueError): + # and KeyError if cmd is otherwise good but ends with a dot. + except (ImportError, ValueError, KeyError): # If we're on line zero, it was the Subject: header that didn't # contain a command. It's possible there's a Re: prefix (or # localized version thereof) on the Subject: line that's messing |