vici: Fix connecting to socket in Python bindings on Windows
socket.connect() takes a single argument with the address that depends
on the address family, for TCP it's a tuple with IP and port.
Fixes: 00a75e332f ("vici: Create default TCP socket on Windows in Python bindings")
Closes strongswan/strongswan#1874
This commit is contained in:
@@ -29,7 +29,7 @@ class Session(CommandWrappers, object):
|
||||
if sock is None:
|
||||
if platform.system() == "Windows":
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.connect('127.0.0.1', 4502)
|
||||
sock.connect(('127.0.0.1', 4502))
|
||||
else:
|
||||
sock = socket.socket(socket.AF_UNIX)
|
||||
sock.connect("/var/run/charon.vici")
|
||||
|
||||
Reference in New Issue
Block a user