From c5c4f5707b56db83a026450ef5a749f98c2ffd3c Mon Sep 17 00:00:00 2001 From: Sheng Date: Fri, 8 Dec 2017 15:50:37 +0800 Subject: [PATCH] Modified error message --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index ae95f73..579d606 100644 --- a/main.py +++ b/main.py @@ -144,11 +144,9 @@ class IndexHandler(tornado.web.RequestHandler): or self.get_specific_pkey(paramiko.ECDSAKey, privatekey, password)\ or self.get_specific_pkey(paramiko.Ed25519Key, privatekey, password) - if not pkey: - raise ValueError('Wrong password for decrypting the private key' - ' or the private key is not valid.') - + raise ValueError('Not a valid private key file or ' + 'wrong password for decrypting the private key.') return pkey def get_port(self):