summaryrefslogtreecommitdiff
path: root/Mailman/Queue/OutgoingRunner.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Queue/OutgoingRunner.py')
-rw-r--r--Mailman/Queue/OutgoingRunner.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Queue/OutgoingRunner.py b/Mailman/Queue/OutgoingRunner.py
index 4bc1afa8b..05b1a4b32 100644
--- a/Mailman/Queue/OutgoingRunner.py
+++ b/Mailman/Queue/OutgoingRunner.py
@@ -46,18 +46,18 @@ class OutgoingRunner(Runner):
# We never lock the lists, but we need to be sure that MailList
# objects read from the cache are always fresh.
self._freshen = 1
+ # We look this function up only at startup time
+ modname = 'Mailman.Handlers.' + mm_cfg.DELIVERY_MODULE
+ mod = __import__(modname)
+ self._func = getattr(sys.modules[modname], 'process')
def _dispose(self, mlist, msg, msgdata):
# Fortunately, we do not need the list lock to do deliveries. However
# this does mean that we aren't as responsive to changes in list
# configuration, since we never reload the list configuration.
- handler = mm_cfg.DELIVERY_MODULE
- modname = 'Mailman.Handlers.' + handler
- mod = __import__(modname)
- func = getattr(sys.modules[modname], 'process')
try:
pid = os.getpid()
- func(mlist, msg, msgdata)
+ self._func(mlist, msg, msgdata)
# Failsafe -- a child may have leaked through.
if pid <> os.getpid():
syslog('error', 'child process leaked thru: %s', modname)