Fix missing tornado import

After upgrading my master (now in 2017.7), salt-api stopped working with the following stacktrace:

```
Tornado /usr/local/lib/python2.7/dist-packages/tornado/__init__.pyc
Process salt.loaded.int.netapi.rest_tornado.start:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/netapi/rest_tornado/__init__.py", line 118, in start
    http_server = tornado.httpserver.HTTPServer(get_application(__opts__), **kwargs)
AttributeError: 'module' object has no attribute 'httpserver'
```

Reproduced with tornado 4.2 and 4.5

This PR fixes the error above.
This commit is contained in:
Marion Duprey 2017-07-27 17:23:26 +02:00 committed by rallytime
parent 5c7def9a43
commit 8818b06f22

View file

@ -115,6 +115,7 @@ def start():
ssl_opts.update({'keyfile': mod_opts['ssl_key']})
kwargs['ssl_options'] = ssl_opts
import tornado.httpserver
http_server = tornado.httpserver.HTTPServer(get_application(__opts__), **kwargs)
try:
http_server.bind(mod_opts['port'],