mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-29 16:27:11 +00:00
fix: 网关测试连接 500
This commit is contained in:
parent
8375008cfa
commit
26a7fa836c
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
|
import socket
|
||||||
import uuid
|
import uuid
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
@ -80,7 +80,8 @@ class Gateway(BaseUser):
|
|||||||
except(paramiko.AuthenticationException,
|
except(paramiko.AuthenticationException,
|
||||||
paramiko.BadAuthenticationType,
|
paramiko.BadAuthenticationType,
|
||||||
paramiko.SSHException,
|
paramiko.SSHException,
|
||||||
paramiko.ssh_exception.NoValidConnectionsError) as e:
|
paramiko.ssh_exception.NoValidConnectionsError,
|
||||||
|
socket.gaierror) as e:
|
||||||
return False, str(e)
|
return False, str(e)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user