Only import wsgiref when needed
wsgiref is only used then server.py is called directly which is usually not the case if monasca-api runs under a wsgi container. Change-Id: I229ac6034107d087750179460153e1350aad314e
This commit is contained in:
parent
4ac6e6821a
commit
6e59104539
|
@ -15,7 +15,6 @@
|
|||
# under the License.
|
||||
|
||||
import os
|
||||
from wsgiref import simple_server
|
||||
|
||||
import falcon
|
||||
from monasca_common.simport import simport
|
||||
|
@ -161,6 +160,7 @@ def get_wsgi_app(config_base_path=None, **kwargs):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from wsgiref import simple_server
|
||||
wsgi_app = get_wsgi_app()
|
||||
httpd = simple_server.make_server('127.0.0.1', 8070, wsgi_app)
|
||||
httpd.serve_forever()
|
||||
|
|
Loading…
Reference in New Issue