Merge pull request #2984 from jumpserver/gateway_conn_bug

[Bugfix] 修复网关测试连接失败未捕获导致报500的bug
This commit is contained in:
BaiJiangJie 2019-07-18 11:16:36 +08:00 committed by GitHub
commit 97bc3d5e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,8 @@ class Gateway(AssetUser):
pkey=self.private_key_obj)
except(paramiko.AuthenticationException,
paramiko.BadAuthenticationType,
paramiko.SSHException) as e:
paramiko.SSHException,
paramiko.ssh_exception.NoValidConnectionsError) as e:
return False, str(e)
try: