Compare commits

...

4 Commits

Author SHA1 Message Date
Josiah Baldwin
04c8f622de Bumped version 2025-06-14 12:53:26 -07:00
Josiah Baldwin
ccb5f1eb40 Removed catch with print statement 2025-06-14 12:50:22 -07:00
Josiah Baldwin
ce2cf2bfe1 Merge branch 'fix/device-details' into development 2025-06-14 12:47:45 -07:00
Josiah Baldwin
a3b4962e7f Update timeout for WS download, becaule it takes a little longer than http 2025-06-14 12:45:36 -07:00
3 changed files with 14 additions and 12 deletions

View File

@@ -2,6 +2,12 @@
Changelog
=========
version 1.2.1
=============
Bugs:
* Fixed handling of meshcentral's list_devices return with details=True
version 1.2.0
=============

View File

@@ -478,17 +478,13 @@ class Session(object):
if "result" in res0:
raise exceptions.ServerError(res0["result"])
if details:
try:
nodes = res0["data"]
# Accept any number of nested strings, meshcentral is odd
while True:
try:
nodes = json.loads(nodes)
except TypeError:
break
except Exception as e:
print(f"Failed to parse device data: {e}")
return
nodes = res0["data"]
# Accept any number of nested strings, meshcentral is odd
while True:
try:
nodes = json.loads(nodes)
except TypeError:
break
for node in nodes:
if node["node"].get("meshid", None):

View File

@@ -120,7 +120,7 @@ async def test_upload_download(env):
downfilestream.seek(0)
start = time.perf_counter()
r = await files.download(f"{pwd}/test", downfilestream, skip_http_attempt=True, timeout=5)
r = await files.download(f"{pwd}/test", downfilestream, skip_http_attempt=True, timeout=20)
print("\ninfo files_download: {}\n".format(r))
assert r["result"] == True, "Download failed"
assert r["size"] == len(randdata), "Downloaded wrong number of bytes"