Browse Source

[Bugfix] 修复网关测试连接失败未捕获导致报500的bug

pull/2984/head
jym503558564 5 years ago
parent
commit
dbb27a7771
  1. 3
      apps/assets/models/domain.py

3
apps/assets/models/domain.py

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

Loading…
Cancel
Save