diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-02-14 13:22:57 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-05 12:26:11 +0200 |
| commit | ba16e07ca74e2d0211808718dd1ffc9611b36ec2 (patch) | |
| tree | 0b81356f8904956c3775c4abd46daae76146fa0f | |
| parent | 79afcbe57ab0b83c75d44004e6c75c309540448e (diff) | |
Python: fix types
Signed-off-by: jwijenbergh <jeroenwijenbergh@protonmail.com>
| -rw-r--r-- | wrappers/python/eduvpncommon/discovery.py | 10 |
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): |
