HTTP status value naming normalization

Replace HTTP status code with constants like HTTP_OK, HTTP_NOT_FOUND, etc.

Change-Id: I76cd8bf880e7269454192a3bc4b027a297741247
This commit is contained in:
Victor Rodionov 2012-04-21 02:02:19 +04:00
parent 84aa3f57e0
commit d70f2edd6e
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ from eventlet.green.httplib import CannotSendRequest
from swift.common.utils import TRUE_VALUES
from swift.common import client
from swift.common import direct_client
from swift.common.http import HTTP_CONFLICT
class ConnectionPool(eventlet.pools.Pool):
@ -152,7 +153,7 @@ class BenchDELETE(Bench):
try:
client.delete_container(self.url, self.token, container)
except client.ClientException, e:
if e.http_status != 409:
if e.http_status != HTTP_CONFLICT:
self._log_status("Unable to delete container '%s'. " \
"Got http status '%d'." % (container, e.http_status))