Closed cjkrolak closed 2 years ago
Hmm, I'm not sure I'm following. _parse_unit is called from within KumoCloudAccount._fetch_if_needed, which is the code that iterates through children. This code is most definitely always used when parsing the info returned from (or cached from) the Kumo servers. The only loop in _parse_unit is over the set of fields to extract so I'm not sure what you're referring to.
'children' is definitely a list of dicts in all the samples I have that I developed the code against, and has been that way from the beginning. Whatever problem you're seeing I think you've misdiagnosed it.
-Doug
sorry my mistake reading the code, there is no issue
KumoCloudAccount._parse_unit() assumes raw JSON output is a dict of dicts, I'm seeing the value for the 'children' element is a list of dicts, so the iterating code within KumoCloudAccount._parse_unit() is failing because string indexes are not allowed for list indexing.
Is anyone using the KumoCloudAccount._parse_unit() static method today?