Skip to content

Commit a64d318

Browse files
committed
improve mm_cfg handler
1 parent e59c277 commit a64d318

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Mailman/Queue/IncomingRunner.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,16 @@ def _get_pipeline(self, mlist, msg, msgdata):
142142
pipeline = msgdata.get('pipeline')
143143
if pipeline is None:
144144
pipeline = getattr(mlist, 'pipeline', None)
145-
if pipeline is None:
145+
else:
146146
# Use the already-imported mm_cfg directly
147147
pipeline = mm_cfg.GLOBAL_PIPELINE
148148

149149
# Ensure pipeline is a list that can be sliced
150150
if not isinstance(pipeline, list):
151-
syslog('error', 'GLOBAL_PIPELINE is not a list: %s (type: %s)',
151+
syslog('error', 'pipeline is not a list: %s (type: %s)',
152152
pipeline, type(pipeline).__name__)
153153
# Fallback to a basic pipeline
154-
pipeline = ['SpamDetect', 'Approve', 'Moderate', 'Hold',
155-
'CalcRecips', 'CookHeaders', 'ToOutgoing']
154+
pipeline = mm_cfg.GLOBAL_PIPELINE
156155

157156
return pipeline[:]
158157

Mailman/htmlformat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ def Format(self, indent=0):
650650
# These are the URLs which the image logos link to. The Mailman home page now
651651
# points at the gnu.org site instead of the www.list.org mirror.
652652
#
653-
from mm_cfg import MAILMAN_URL
653+
MAILMAN_URL = Mailman.mm_cfg.MAILMAN_URL
654+
# from Mailman.mm_cfg import MAILMAN_URL
654655
PYTHON_URL = 'http://www.python.org/'
655656
GNU_URL = 'http://www.gnu.org/'
656657

0 commit comments

Comments
 (0)