Trivial:remove unused import and add reasonable path in import

Change-Id: Ida320e376a84a36de62a5e97b4107e1f948cd934
This commit is contained in:
shizhihui 2016-11-13 23:57:15 +08:00 committed by Rico Lin
parent 9014a2b3c1
commit 72b365c29c
1 changed files with 4 additions and 6 deletions

View File

@ -38,9 +38,8 @@ from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
from oslo_utils import importutils
from paste import deploy
import routes
import routes.middleware
from paste.deploy import loadwsgi
from routes import middleware
import six
import webob.dec
import webob.exc
@ -672,8 +671,7 @@ class Router(object):
mapper.connect(None, "/v1.0/{path_info:.*}", controller=BlogApp())
"""
self.map = mapper
self._router = routes.middleware.RoutesMiddleware(self._dispatch,
self.map)
self._router = middleware.RoutesMiddleware(self._dispatch, self.map)
@webob.dec.wsgify
def __call__(self, req):
@ -1082,6 +1080,6 @@ def paste_deploy_app(paste_config_file, app_name, conf):
"""
setup_paste_factories(conf)
try:
return deploy.loadapp("config:%s" % paste_config_file, name=app_name)
return loadwsgi.loadapp("config:%s" % paste_config_file, name=app_name)
finally:
teardown_paste_factories()