From ce3c70c41978e71ca3d70d06bd76bf71d6b64eab Mon Sep 17 00:00:00 2001 From: Sheng Date: Wed, 11 Apr 2018 20:32:34 +0800 Subject: [PATCH] Renamed get_pkey to get_pkey_obj --- handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler.py b/handler.py index fa681e6..5675716 100644 --- a/handler.py +++ b/handler.py @@ -60,7 +60,7 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler): else: return pkey - def get_pkey(self, privatekey, password): + def get_pkey_obj(self, privatekey, password): password = password.encode('utf-8') if password else None pkey = self.get_specific_pkey(paramiko.RSAKey, privatekey, password)\ @@ -97,7 +97,7 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler): username = self.get_value('username') password = self.get_argument('password') privatekey = self.get_privatekey() - pkey = self.get_pkey(privatekey, password) if privatekey else None + pkey = self.get_pkey_obj(privatekey, password) if privatekey else None args = (hostname, port, username, password, pkey) logging.debug(args) return args