run in HTTP if no certficate is found

This commit is contained in:
Davide Alberani 2015-04-26 10:40:38 +02:00
parent 42f1a47dc1
commit 84ddf76543

View file

@ -543,7 +543,7 @@ def run():
ssl_options = {}
if os.path.isfile(options.ssl_key) and os.path.isfile(options.ssl_cert):
ssl_options = dict(certfile=options.ssl_cert, keyfile=options.ssl_key)
http_server = tornado.httpserver.HTTPServer(application, ssl_options=ssl_options)
http_server = tornado.httpserver.HTTPServer(application, ssl_options=ssl_options or None)
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()