summaryrefslogtreecommitdiff
path: root/mailman/app
diff options
context:
space:
mode:
Diffstat (limited to 'mailman/app')
-rw-r--r--mailman/app/bounces.py3
-rw-r--r--mailman/app/commands.py6
-rw-r--r--mailman/app/lifecycle.py4
-rw-r--r--mailman/app/membership.py4
-rw-r--r--mailman/app/moderator.py8
-rw-r--r--mailman/app/notifications.py2
-rw-r--r--mailman/app/registrar.py2
-rw-r--r--mailman/app/replybot.py3
8 files changed, 25 insertions, 7 deletions
diff --git a/mailman/app/bounces.py b/mailman/app/bounces.py
index 704921f38..875f615a5 100644
--- a/mailman/app/bounces.py
+++ b/mailman/app/bounces.py
@@ -17,6 +17,9 @@
"""Application level bounce handling."""
+from __future__ import unicode_literals
+
+__metaclass__ = type
__all__ = [
'bounce_message',
]
diff --git a/mailman/app/commands.py b/mailman/app/commands.py
index ef7b0a7c7..d7676af9c 100644
--- a/mailman/app/commands.py
+++ b/mailman/app/commands.py
@@ -17,6 +17,8 @@
"""Initialize the email commands."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'initialize',
@@ -37,6 +39,6 @@ def initialize():
if not IEmailCommand.implementedBy(command_class):
continue
assert command_class.name not in config.commands, (
- 'Duplicate email command "%s" found in %s' %
- (command_class.name, module))
+ 'Duplicate email command "{0}" found in {1}'.format(
+ command_class.name, module))
config.commands[command_class.name] = command_class()
diff --git a/mailman/app/lifecycle.py b/mailman/app/lifecycle.py
index 7b7daadf3..c57d7e1fc 100644
--- a/mailman/app/lifecycle.py
+++ b/mailman/app/lifecycle.py
@@ -17,6 +17,8 @@
"""Application level list creation."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'create_list',
@@ -83,7 +85,7 @@ def remove_list(fqdn_listname, mailing_list=None, archives=True):
# Do the MTA-specific list deletion tasks
module_name, class_name = config.mta.incoming.rsplit('.', 1)
__import__(module_name)
- getattr(sys.modules[module_name], class_name)().create(mlist)
+ getattr(sys.modules[module_name], class_name)().create(mailing_list)
# Remove the list directory.
removeables.append(os.path.join(config.LIST_DATA_DIR, fqdn_listname))
# Remove any stale locks associated with the list.
diff --git a/mailman/app/membership.py b/mailman/app/membership.py
index 4d20be91e..4b9609469 100644
--- a/mailman/app/membership.py
+++ b/mailman/app/membership.py
@@ -17,6 +17,8 @@
"""Application support for membership management."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'add_member',
@@ -99,7 +101,7 @@ def add_member(mlist, address, realname, password, delivery_mode, language):
break
else:
raise AssertionError(
- 'User should have had linked address: %s', address)
+ 'User should have had linked address: {0}'.format(address))
# Create the member and set the appropriate preferences.
member = address_obj.subscribe(mlist, MemberRole.member)
member.preferences.preferred_language = language
diff --git a/mailman/app/moderator.py b/mailman/app/moderator.py
index 73a341534..b40a34344 100644
--- a/mailman/app/moderator.py
+++ b/mailman/app/moderator.py
@@ -17,6 +17,8 @@
"""Application support for moderators."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'handle_message',
@@ -144,7 +146,7 @@ def handle_message(mlist, id, action,
# processing.
config.switchboards['in'].enqueue(msg, _metadata=msgdata)
else:
- raise AssertionError('Unexpected action: %s' % action)
+ raise AssertionError('Unexpected action: {0}'.format(action))
# Forward the message.
if forward:
# Get a copy of the original message from the message store.
@@ -257,7 +259,7 @@ def handle_subscription(mlist, id, action, comment=None):
delivery_mode, formataddr((realname, address)),
'via admin approval')
else:
- raise AssertionError('Unexpected action: %s' % action)
+ raise AssertionError('Unexpected action: {0}'.format(action))
# Delete the request from the database.
requestdb.delete_request(id)
@@ -313,7 +315,7 @@ def handle_unsubscription(mlist, id, action, comment=None):
pass
slog.info('%s: deleted %s', mlist.fqdn_listname, address)
else:
- raise AssertionError('Unexpected action: %s' % action)
+ raise AssertionError('Unexpected action: {0}'.format(action))
# Delete the request from the database.
requestdb.delete_request(id)
diff --git a/mailman/app/notifications.py b/mailman/app/notifications.py
index d60fe5fcf..9bef9998b 100644
--- a/mailman/app/notifications.py
+++ b/mailman/app/notifications.py
@@ -17,6 +17,8 @@
"""Sending notifications."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'send_admin_subscription_notice',
diff --git a/mailman/app/registrar.py b/mailman/app/registrar.py
index ad291891e..6a2abeba9 100644
--- a/mailman/app/registrar.py
+++ b/mailman/app/registrar.py
@@ -17,6 +17,8 @@
"""Implementation of the IUserRegistrar interface."""
+from __future__ import unicode_literals
+
__metaclass__ = type
__all__ = [
'Registrar',
diff --git a/mailman/app/replybot.py b/mailman/app/replybot.py
index e9c303418..0537f6645 100644
--- a/mailman/app/replybot.py
+++ b/mailman/app/replybot.py
@@ -21,6 +21,9 @@
# mailing list. The reply governor should really apply site-wide per
# recipient (I think).
+from __future__ import unicode_literals
+
+__metaclass__ = type
__all__ = [
'autorespond_to_sender',
'can_acknowledge',