summaryrefslogtreecommitdiff
path: root/mailman/queue/news.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-12-28 19:14:04 -0500
committerBarry Warsaw2008-12-28 19:14:04 -0500
commit7713f04267b9f9245b371c54857ca402a81a3c77 (patch)
treeefb41850451306e453e28274fb225593bbdd6395 /mailman/queue/news.py
parent37a69a1b28e0dfbf8357e12798193969accf98ff (diff)
downloadmailman-7713f04267b9f9245b371c54857ca402a81a3c77.tar.gz
mailman-7713f04267b9f9245b371c54857ca402a81a3c77.tar.zst
mailman-7713f04267b9f9245b371c54857ca402a81a3c77.zip
Diffstat (limited to 'mailman/queue/news.py')
-rw-r--r--mailman/queue/news.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/mailman/queue/news.py b/mailman/queue/news.py
index 70ffae71b..a64afae18 100644
--- a/mailman/queue/news.py
+++ b/mailman/queue/news.py
@@ -28,8 +28,8 @@ from email.utils import getaddresses, make_msgid
COMMASPACE = ', '
+from mailman import Defaults
from mailman import Utils
-from mailman.config import config
from mailman.interfaces import NewsModeration
from mailman.queue import Runner
@@ -51,8 +51,6 @@ mcre = re.compile(r"""
class NewsRunner(Runner):
- QDIR = config.NEWSQUEUE_DIR
-
def _dispose(self, mlist, msg, msgdata):
# Make sure we have the most up-to-date state
mlist.Load()
@@ -67,8 +65,8 @@ class NewsRunner(Runner):
nntp_host, nntp_port = Utils.nntpsplit(mlist.nntp_host)
conn = nntplib.NNTP(nntp_host, nntp_port,
readermode=True,
- user=config.NNTP_USERNAME,
- password=config.NNTP_PASSWORD)
+ user=Defaults.NNTP_USERNAME,
+ password=Defaults.NNTP_PASSWORD)
conn.post(fp)
except nntplib.error_temp, e:
log.error('(NNTPDirect) NNTP error for list "%s": %s',
@@ -150,9 +148,9 @@ def prepare_message(mlist, msg, msgdata):
# woon't completely sanitize the message, but it will eliminate the bulk
# of the rejections based on message headers. The NNTP server may still
# reject the message because of other problems.
- for header in config.NNTP_REMOVE_HEADERS:
+ for header in Defaults.NNTP_REMOVE_HEADERS:
del msg[header]
- for header, rewrite in config.NNTP_REWRITE_DUPLICATE_HEADERS:
+ for header, rewrite in Defaults.NNTP_REWRITE_DUPLICATE_HEADERS:
values = msg.get_all(header, [])
if len(values) < 2:
# We only care about duplicates