diff options
| author | Barry Warsaw | 2014-12-15 18:44:17 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-15 18:44:17 -0500 |
| commit | acf95993ceb605c71ad07a32a572ae1f0888a7de (patch) | |
| tree | cf0dfe685c8f6fcd5949b4ff3709f4481ddbe163 /src/mailman/rest/lists.py | |
| parent | d91715ea8b2692475b0751742e131bc1673b138b (diff) | |
| download | mailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.tar.gz mailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.tar.zst mailman-acf95993ceb605c71ad07a32a572ae1f0888a7de.zip | |
Diffstat (limited to 'src/mailman/rest/lists.py')
| -rw-r--r-- | src/mailman/rest/lists.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mailman/rest/lists.py b/src/mailman/rest/lists.py index feaa96323..87aa9f4b5 100644 --- a/src/mailman/rest/lists.py +++ b/src/mailman/rest/lists.py @@ -213,9 +213,8 @@ class AllLists(_ListBase): except ListAlreadyExistsError: bad_request(response, b'Mailing list exists') except BadDomainSpecificationError as error: - bad_request( - response, - b'Domain does not exist: {0}'.format(error.domain)) + reason = 'Domain does not exist: {}'.format(error.domain) + bad_request(response, reason.encode('utf-8')) except ValueError as error: bad_request(response, str(error)) else: @@ -275,7 +274,7 @@ class ArchiverGetterSetter(GetterSetter): # attribute will contain the (bytes) name of the archiver that is # getting a new status. value will be the representation of the new # boolean status. - archiver = self._archiver_set.get(attribute.decode('utf-8')) + archiver = self._archiver_set.get(attribute) if archiver is None: raise ValueError('No such archiver: {}'.format(attribute)) archiver.is_enabled = as_boolean(value) |
