From 87393f4eba3b68f9598c02dcbe1f06f2afdd400c Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 30 Mar 2017 14:01:30 +0800 Subject: replace self-defined http codes with standard definitions Change-Id: I3045dc690e0bc1186f5c548cb533462dd03130d9 Signed-off-by: SerenaFeng --- testapi/opnfv_testapi/resources/project_handlers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testapi/opnfv_testapi/resources/project_handlers.py') diff --git a/testapi/opnfv_testapi/resources/project_handlers.py b/testapi/opnfv_testapi/resources/project_handlers.py index f352196..087bb8a 100644 --- a/testapi/opnfv_testapi/resources/project_handlers.py +++ b/testapi/opnfv_testapi/resources/project_handlers.py @@ -6,8 +6,9 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import httplib + import handlers -from opnfv_testapi.common import constants from opnfv_testapi.tornado_swagger import swagger import project_models @@ -48,7 +49,7 @@ class ProjectCLHandler(GenericProjectHandler): def error(data): message = '{} already exists as a project'.format(data.name) - return constants.HTTP_FORBIDDEN, message + return httplib.FORBIDDEN, message miss_checks = ['name'] db_checks = [(self.table, False, query, error)] -- cgit 1.2.3-korg