1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-17 07:40:09 -07:00

Don't raise OK responses as errors

This commit is contained in:
Adrian Sampson 2018-01-08 13:25:50 -08:00
parent e31f126cd9
commit 9bf7918314

View File

@ -55,6 +55,7 @@ def lgedm_post(url, data=None, access_token=None, session_id=None):
# Check for API errors. # Check for API errors.
if 'returnCd' in out: if 'returnCd' in out:
code = out['returnCd'] code = out['returnCd']
if code != '0000':
message = out['returnMsg'] message = out['returnMsg']
if code == "0102": if code == "0102":
raise NotLoggedInError() raise NotLoggedInError()