From ba16e07ca74e2d0211808718dd1ffc9611b36ec2 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 14 Feb 2022 13:22:57 +0100 Subject: Python: fix types Signed-off-by: jwijenbergh --- wrappers/python/eduvpncommon/discovery.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wrappers/python/eduvpncommon/discovery.py') 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): -- cgit v1.2.3