summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-02-14 13:22:57 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-05 12:26:11 +0200
commitba16e07ca74e2d0211808718dd1ffc9611b36ec2 (patch)
tree0b81356f8904956c3775c4abd46daae76146fa0f /wrappers
parent79afcbe57ab0b83c75d44004e6c75c309540448e (diff)
Python: fix types
Signed-off-by: jwijenbergh <jeroenwijenbergh@protonmail.com>
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/python/eduvpncommon/discovery.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wrappers/python/eduvpncommon/discovery.py b/wrappers/python/eduvpncommon/discovery.py
index ae721c7..48089da 100644
--- a/wrappers/python/eduvpncommon/discovery.py
+++ b/wrappers/python/eduvpncommon/discovery.py
@@ -14,9 +14,9 @@ def getOrganizationsList() -> str:
dataError = lib.GetOrganizationsList()
ptr = dataError.data
error = dataError.error
- body = None
+ body = ""
if not error:
- body = cast(ptr, c_char_p).value
+ body = str(cast(ptr, c_char_p).value)
lib.FreeString(ptr)
if error:
raise RequestError(error)
@@ -24,15 +24,15 @@ def getOrganizationsList() -> str:
class GoError(Exception):
- message_dict: Enum
- code: int
+ message_dict: dict
+ code: Enum | None
def __init__(self, err: Enum, messages: dict):
assert err
try:
self.code = err
except ValueError:
- self.code = -1
+ self.code = None
self.message_dict = messages
def __str__(self):