summaryrefslogtreecommitdiff
path: root/src/mailman/rest/users.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-12-15 18:44:17 -0500
committerBarry Warsaw2014-12-15 18:44:17 -0500
commitacf95993ceb605c71ad07a32a572ae1f0888a7de (patch)
treecf0dfe685c8f6fcd5949b4ff3709f4481ddbe163 /src/mailman/rest/users.py
parentd91715ea8b2692475b0751742e131bc1673b138b (diff)
downloadmailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.tar.gz
mailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.tar.zst
mailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.zip
Diffstat (limited to 'src/mailman/rest/users.py')
-rw-r--r--src/mailman/rest/users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py
index 7e6e70c5a..c8e3475e7 100644
--- a/src/mailman/rest/users.py
+++ b/src/mailman/rest/users.py
@@ -122,8 +122,8 @@ class AllUsers(_UserBase):
try:
user = getUtility(IUserManager).create_user(**arguments)
except ExistingAddressError as error:
- bad_request(
- response, b'Address already exists: {0}'.format(error.address))
+ reason = 'Address already exists: {}'.format(error.address)
+ bad_request(response, reason.encode('utf-8'))
return
if password is None:
# This will have to be reset since it cannot be retrieved.