Closed dmzoneill closed 1 year ago
Hi,
No it wasn't a design decision I just assumed that a response json with ["result"]["response"]
would come and all other errors would be caught by unpacking the body. I don't see any problem with moving it inside the try statement but some more sophisticated error handling might be needed in case there isn't an error code available either.
Thanks for mentioning this! I look forward to the pull request.
I'll probably create a PR for this shortly. I get this randomly off a plug
Not sure if this was a design decision, to put the decrypt outside the try statement?
https://github.com/fishbigger/TapoP100/blob/2d3478927928a3c2bec31e730fea150c0d52245b/PyP100/PyP100.py#L156