watchforstock / evohome-client

Python client to access the Evohome web service
Apache License 2.0
88 stars 52 forks source link

Logic error in evohomeclient/__init__.py #68

Closed zxdavb closed 5 years ago

zxdavb commented 5 years ago

Woops:

if response.status_code != requests.codes.ok:                        # pylint: disable=no-member
    if 'code' in response.text:  # don't use response.json()!
        message = ("HTTP Status = " + str(response.status_code) +
                   ", Response = " + response.text)
        raise requests.HTTPError(message)

Has a logic error - if not 200, but no 'code' in response.text, will just fall through.