From 3b4282861d8ac521dcb5cf79330fcc4eac59ba44 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 11 Jul 2022 15:50:00 +0200 Subject: Types + Exports: Return JSON and use error level --- wrappers/python/src/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wrappers/python/src/main.py') diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py index 3707d16..6f4b140 100644 --- a/wrappers/python/src/main.py +++ b/wrappers/python/src/main.py @@ -1,5 +1,4 @@ from . import lib, VPNStateChange, encode_args, decode_res -from enum import Enum from typing import Optional, Tuple import threading from .event import StateType, EventHandler @@ -103,7 +102,7 @@ class EduVPN(object): # The event is set in self.set_profile self.profile_event = threading.Event() - config, config_type, config_err = self.go_function(func, url, force_tcp) + config_json, config_err = self.go_function(func, url, force_tcp) self.profile_event = None self.location_event = None @@ -111,6 +110,9 @@ class EduVPN(object): if config_err: raise Exception(config_err) + config = config_json["config"] + config_type = config_json["config_type"] + return config, config_type def get_config_custom_server( -- cgit v1.2.3