summaryrefslogtreecommitdiff
path: root/src/mailman/handlers/to_usenet.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-03-31 04:51:42 -0600
committerBarry Warsaw2012-03-31 04:51:42 -0600
commitf11b1601c61c97a3fc2dd400fbc2913235efa83d (patch)
tree5b3ef89bbc99cf17b7dabbc48026c1f585eead29 /src/mailman/handlers/to_usenet.py
parent7f0c57ca63d13058934e3eb8423ea52075e984ae (diff)
downloadmailman-f11b1601c61c97a3fc2dd400fbc2913235efa83d.tar.gz
mailman-f11b1601c61c97a3fc2dd400fbc2913235efa83d.tar.zst
mailman-f11b1601c61c97a3fc2dd400fbc2913235efa83d.zip
Diffstat (limited to 'src/mailman/handlers/to_usenet.py')
-rw-r--r--src/mailman/handlers/to_usenet.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mailman/handlers/to_usenet.py b/src/mailman/handlers/to_usenet.py
index 26a383c64..021f8f9e5 100644
--- a/src/mailman/handlers/to_usenet.py
+++ b/src/mailman/handlers/to_usenet.py
@@ -17,7 +17,7 @@
"""Move the message to the mail->news queue."""
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
__metaclass__ = type
__all__ = [
@@ -50,11 +50,12 @@ class ToUsenet:
def process(self, mlist, msg, msgdata):
"""See `IHandler`."""
# Short circuits.
- if not mlist.gateway_to_news or \
- msgdata.get('isdigest') or \
- msgdata.get('fromusenet'):
+ if (not mlist.gateway_to_news or
+ msgdata.get('isdigest') or
+ msgdata.get('fromusenet')):
+ # Short-circuit.
return
- # sanity checks
+ # Sanity checks.
error = []
if not mlist.linked_newsgroup:
error.append('no newsgroup')
@@ -65,5 +66,5 @@ class ToUsenet:
COMMASPACE.join(error))
return
# Put the message in the news runner's queue.
- config.switchboards['news'].enqueue(
+ config.switchboards['nntp'].enqueue(
msg, msgdata, listname=mlist.fqdn_listname)