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:
Tobias Brunner
2023-08-31 11:39:52 +02:00
parent e2bba1e2cf
commit 0bff5c98bc
@@ -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")