summaryrefslogtreecommitdiff
path: root/wrappers/python/src/main.py
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-11 15:50:00 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-11 15:50:00 +0200
commit3b4282861d8ac521dcb5cf79330fcc4eac59ba44 (patch)
tree4c296d41b70e4bbf77a619f00842495ce39f6aec /wrappers/python/src/main.py
parent994f18e532c0501a51fd9bb8563d6ee351785e04 (diff)
Types + Exports: Return JSON and use error level
Diffstat (limited to 'wrappers/python/src/main.py')
-rw-r--r--wrappers/python/src/main.py6
1 files changed, 4 insertions, 2 deletions
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(