webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit 1fee3146c21b237304d602b27190e3c733fe9a62
parent 614d6e8a5bdfa5a8da1e3d4a3648091c6dab5ba1
Author: Sheng <webmaster0115@gmail.com>
Date:   Sat, 18 Aug 2018 20:21:12 +0800

Clean code

Diffstat:
Mwebssh/main.py | 9++++-----
Mwebssh/settings.py | 1-
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/webssh/main.py b/webssh/main.py @@ -2,7 +2,7 @@ import logging import tornado.web import tornado.ioloop -from tornado.options import parse_command_line, options +from tornado.options import options from webssh.handler import IndexHandler, WsockHandler from webssh.settings import (get_app_settings, get_host_keys_settings, get_policy_setting, max_body_size) @@ -20,13 +20,12 @@ def make_handlers(loop, options): return handlers -def make_app(handlers, app_settings): - app = tornado.web.Application(handlers, **app_settings) - return app +def make_app(handlers, settings): + return tornado.web.Application(handlers, **settings) def main(): - parse_command_line() + options.parse_command_line() loop = tornado.ioloop.IOLoop.current() app = make_app(make_handlers(loop, options), get_app_settings(options)) app.listen(options.port, options.address, max_body_size=max_body_size) diff --git a/webssh/settings.py b/webssh/settings.py @@ -36,7 +36,6 @@ def get_app_settings(options): settings = dict( template_path=os.path.join(base_dir, 'webssh', 'templates'), static_path=os.path.join(base_dir, 'webssh', 'static'), - cookie_secret=uuid.uuid4().hex, websocket_ping_interval=options.wpIntvl, xsrf_cookies=(not options.debug), debug=options.debug