patch from maxime ripard adding ip6 support.
This commit is contained in:
parent
7bd95eb0d0
commit
5e32b33be7
|
@ -273,6 +273,9 @@ class SSHClient (object):
|
||||||
establishing an SSH session
|
establishing an SSH session
|
||||||
@raise socket.error: if a socket error occurred while connecting
|
@raise socket.error: if a socket error occurred while connecting
|
||||||
"""
|
"""
|
||||||
|
if len(hostname.split(':')) > 1:
|
||||||
|
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
|
||||||
|
else:
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
if timeout is not None:
|
if timeout is not None:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue