home-assistant-ecosystem / python-glances-api

Python API for interacting with Glances
MIT License
4 stars 8 forks source link

Raise error for any not OK response code #12

Closed engrbm87 closed 2 years ago

engrbm87 commented 2 years ago

Some users reported that the glances integration is failing or not creating any sensors. It turned out that they have glances running in -s mode and not in -w mode. Doing so will return a 501 status_code when the get all data request is sent. This PR ensures that we raise an error for any response status that is not 200. Fixes issue: https://github.com/home-assistant/core/issues/70373