From f157be5b6c443e0e651f2e6a6b0577a552b3ad17 Mon Sep 17 00:00:00 2001 From: Sheng Date: Wed, 11 Apr 2018 20:19:49 +0800 Subject: [PATCH] Renamed get_host_keys to load_host_keys --- policy.py | 2 +- settings.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/policy.py b/policy.py index 71c4260..638ee20 100644 --- a/policy.py +++ b/policy.py @@ -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() diff --git a/settings.py b/settings.py index 22d021b..1101577 100644 --- a/settings.py +++ b/settings.py @@ -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,