Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑天保
webssh
Commits
1fee3146
Commit
1fee3146
authored
Aug 18, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean code
parent
614d6e8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
main.py
webssh/main.py
+4
-5
settings.py
webssh/settings.py
+0
-1
No files found.
webssh/main.py
View file @
1fee3146
...
...
@@ -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
)
...
...
webssh/settings.py
View file @
1fee3146
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment