Skip to content

Commit 8723c26

Browse files
committed
fix: change type defintion
1 parent ad13cd7 commit 8723c26

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cryptlex/lexfloatclient/lexfloatclient.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def __init__(self, name, enabled, data):
2121
self.data = data
2222

2323
class HostConfig(object):
24-
def __init__(self, hostConfig):
25-
self.maxOfflineLeaseDuration = hostConfig.get("maxOfflineLeaseDuration")
24+
def __init__(self, maxOfflineLeaseDuration):
25+
self.maxOfflineLeaseDuration = maxOfflineLeaseDuration
2626

2727

2828
class LexFloatClient:
@@ -133,18 +133,18 @@ def GetHostConfig():
133133
LexFloatClientException
134134
135135
Returns:
136-
str: host configuration.
136+
HostConfig: host configuration.
137137
"""
138-
buffer_size = 4096
138+
buffer_size = 1024
139139
buffer = LexFloatClientNative.get_ctype_string_buffer(buffer_size)
140140
status = LexFloatClientNative.GetHostConfig(buffer, buffer_size)
141141
if status == LexFloatStatusCodes.LF_OK:
142142
host_config_json = LexFloatClientNative.byte_to_string(buffer.value)
143143
if not host_config_json.strip():
144-
return []
144+
return None
145145
else:
146146
host_config = json.loads(host_config_json)
147-
return [HostConfig(host_config_details) for host_config_details in host_config]
147+
return HostConfig(host_config["maxOfflineLeaseDuration"])
148148
else:
149149
raise LexFloatClientException(status)
150150

0 commit comments

Comments
 (0)