summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/python/eduvpn_common/loader.py4
-rw-r--r--wrappers/python/eduvpn_common/main.py16
2 files changed, 16 insertions, 4 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index 988d827..202e2da 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -140,11 +140,11 @@ def initialize_functions(lib: CDLL) -> None:
lib.RenewSession.argtypes, lib.RenewSession.restype = [c_char_p], c_void_p
lib.SetConnected.argtypes, lib.SetConnected.restype = [c_char_p], c_void_p
lib.SetConnecting.argtypes, lib.SetConnecting.restype = [c_char_p], c_void_p
- lib.SetDisconnected.argtypes, lib.SetDisconnected.restype = [
+ lib.Cleanup.argtypes, lib.Cleanup.restype = [
c_char_p,
- c_int,
cToken,
], c_void_p
+ lib.SetDisconnected.argtypes, lib.SetDisconnected.restype = [c_char_p], c_void_p
lib.SetDisconnecting.argtypes, lib.SetDisconnecting.restype = [c_char_p], c_void_p
lib.SetProfileID.argtypes, lib.SetProfileID.restype = [c_char_p, c_char_p], c_void_p
lib.SetSearchServer.argtypes, lib.SetSearchServer.restype = [c_char_p], c_void_p
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index 4204239..7e96d6a 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -332,7 +332,19 @@ class EduVPN(object):
if connecting_err:
raise connecting_err
- def set_disconnected(self, cleanup: bool = True, tokens: Optional[Token] = None) -> None:
+ def cleanup(self, tokens: Optional[Token] = None) -> None:
+ """Cleanup the vpn connection
+
+ :param tokens: Optional[Token] (Default value = None): The OAuth tokens if available
+
+ :raises WrappedError: An error by the Go library
+ """
+ cleanup_err = self.go_function(self.lib.Cleanup, encode_tokens(tokens))
+
+ if cleanup_err:
+ raise cleanup_err
+
+ def set_disconnected(self, ) -> None:
"""Set the FSM to disconnected
:param cleanup: bool: (Default value = True): Whether or not to call /disconnect to the server. This invalidates the OpenVPN/WireGuard configuration
@@ -340,7 +352,7 @@ class EduVPN(object):
:raises WrappedError: An error by the Go library
"""
- disconnect_err = self.go_function(self.lib.SetDisconnected, cleanup, encode_tokens(tokens))
+ disconnect_err = self.go_function(self.lib.SetDisconnected)
if disconnect_err:
raise disconnect_err