time.sleep(1)
chunk = connection.read()
json = "".join(chunks)
+
if "Content-Length" in connection.info():
assert len(json) == int(connection.info()["Content-Length"]), "The packet header promised %s of data but only was able to read %s of data" % (
- len(json),
connection.info()["Content-Length"],
+ len(json),
)
data = DottedDict('ROOT', parse_json(json))