diff options
Diffstat (limited to 'api/server.py')
-rw-r--r-- | api/server.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/api/server.py b/api/server.py index 8cce4de87..5bac1ba47 100644 --- a/api/server.py +++ b/api/server.py @@ -6,17 +6,20 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -import logging -from itertools import ifilter +from __future__ import absolute_import + import inspect +import logging +from functools import reduce +from six.moves import filter +from flasgger import Swagger from flask import Flask from flask_restful import Api -from flasgger import Swagger from api.database import Base -from api.database import engine from api.database import db_session +from api.database import engine from api.database import models from api.urls import urlpatterns from yardstick import _init_logging @@ -44,7 +47,7 @@ def init_db(): pass return False - subclses = ifilter(func, inspect.getmembers(models, inspect.isclass)) + subclses = filter(func, inspect.getmembers(models, inspect.isclass)) logger.debug('Import models: %s', [a[1] for a in subclses]) Base.metadata.create_all(bind=engine) |