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
f157be5b
Commit
f157be5b
authored
Apr 11, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed get_host_keys to load_host_keys
parent
6c9af890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
policy.py
policy.py
+1
-1
settings.py
settings.py
+3
-3
No files found.
policy.py
View file @
f157be5b
...
...
@@ -4,7 +4,7 @@ import threading
import
paramiko
def
get
_host_keys
(
path
):
def
load
_host_keys
(
path
):
if
os
.
path
.
exists
(
path
)
and
os
.
path
.
isfile
(
path
):
return
paramiko
.
hostkeys
.
HostKeys
(
filename
=
path
)
return
paramiko
.
hostkeys
.
HostKeys
()
...
...
settings.py
View file @
f157be5b
...
...
@@ -3,7 +3,7 @@ import os.path
import
uuid
from
tornado.options
import
define
from
policy
import
get
_host_keys
,
get_policy_class
,
check_policy_setting
from
policy
import
load
_host_keys
,
get_policy_class
,
check_policy_setting
define
(
'address'
,
default
=
'127.0.0.1'
,
help
=
'listen address'
)
...
...
@@ -34,13 +34,13 @@ def get_host_keys_settings(options):
host_keys_filename
=
os
.
path
.
join
(
base_dir
,
'known_hosts'
)
else
:
host_keys_filename
=
options
.
hostFile
host_keys
=
get
_host_keys
(
host_keys_filename
)
host_keys
=
load
_host_keys
(
host_keys_filename
)
if
not
options
.
sysHostFile
:
filename
=
os
.
path
.
expanduser
(
'~/.ssh/known_hosts'
)
else
:
filename
=
options
.
sysHostFile
system_host_keys
=
get
_host_keys
(
filename
)
system_host_keys
=
load
_host_keys
(
filename
)
settings
=
dict
(
host_keys
=
host_keys
,
...
...
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