diff options
author | Pete Zaitcev <zaitcev@kotori.zaitcev.us> | 2019-02-18 19:03:49 -0600 |
---|---|---|
committer | Pete Zaitcev <zaitcev@kotori.zaitcev.us> | 2019-03-04 15:16:27 -0600 |
commit | 860ae1e001d95df3096cfc81c42a9fe6feda067f (patch) | |
tree | 1f20d2d31cf1a4473cac5c235b16f01f65541f0e | |
parent | 45994e4d3187decdfa2513c0fc0fa337ec888948 (diff) | |
download | swift-860ae1e001d95df3096cfc81c42a9fe6feda067f.tar.gz |
py3: port proxy account controller
Change-Id: I5a0d2108d01395aedb4ac18464ed2e38ad13ce84
-rw-r--r-- | swift/proxy/controllers/account.py | 6 | ||||
-rw-r--r-- | tox.ini | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/swift/proxy/controllers/account.py b/swift/proxy/controllers/account.py index 174d87a31..979e6bb1f 100644 --- a/swift/proxy/controllers/account.py +++ b/swift/proxy/controllers/account.py @@ -55,7 +55,7 @@ class AccountController(Controller): length_limit = self.get_name_length_limit() if len(self.account_name) > length_limit: resp = HTTPBadRequest(request=req) - resp.body = 'Account name length of %d longer than %d' % \ + resp.body = b'Account name length of %d longer than %d' % \ (len(self.account_name), length_limit) # Don't cache this. We know the account doesn't exist because # the name is bad; we don't need to cache that because it's @@ -119,7 +119,7 @@ class AccountController(Controller): length_limit = self.get_name_length_limit() if len(self.account_name) > length_limit: resp = HTTPBadRequest(request=req) - resp.body = 'Account name length of %d longer than %d' % \ + resp.body = b'Account name length of %d longer than %d' % \ (len(self.account_name), length_limit) return resp account_partition, accounts = \ @@ -138,7 +138,7 @@ class AccountController(Controller): length_limit = self.get_name_length_limit() if len(self.account_name) > length_limit: resp = HTTPBadRequest(request=req) - resp.body = 'Account name length of %d longer than %d' % \ + resp.body = b'Account name length of %d longer than %d' % \ (len(self.account_name), length_limit) return resp error_response = check_metadata(req, 'account') @@ -87,6 +87,7 @@ commands = test/unit/obj/test_replicator.py \ test/unit/obj/test_server.py \ test/unit/obj/test_updater.py \ + test/unit/proxy/controllers/test_account.py \ test/unit/proxy/controllers/test_base.py \ test/unit/proxy/controllers/test_info.py \ test/unit/proxy/controllers/test_obj.py} |