Merge pull request #375 from JermaHuang/master

🐛 fix(libs/ssh): fix wrong exception message
pull/380/head
vapao 2021-09-09 13:50:36 +08:00 committed by GitHub
commit 3ad137ffb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ from io import StringIO
class SSH: class SSH:
def __init__(self, hostname, port=SSH_PORT, username='root', pkey=None, password=None, connect_timeout=10): def __init__(self, hostname, port=SSH_PORT, username='root', pkey=None, password=None, connect_timeout=10):
if pkey is None and password is None: if pkey is None and password is None:
raise Exception('public key and password must have one is not None') raise Exception('private key and password cannot both be None')
self.client = None self.client = None
self.arguments = { self.arguments = {
'hostname': hostname, 'hostname': hostname,