Renamed get_pkey to get_pkey_obj

pull/12/head
Sheng 2018-04-11 20:32:34 +08:00
parent 24de647738
commit ce3c70c419
1 changed files with 2 additions and 2 deletions

View File

@ -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