Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Exception if vendor's servers are currently unavailable #26093

Merged
merged 2 commits into from Aug 20, 2019

Conversation

@WoLpH
Copy link
Contributor

commented Aug 20, 2019

Description:

Whenever the evohome servers are down we get this error in the logs:

2019-08-20 21:02:02 WARNING (SyncWorker_0) [homeassistant.components.evohome] Vendor says their server is currently unavailable. Check the vendor's status page.
2019-08-20 21:02:02 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "homeassistant/components/evohome/__init__.py", line 276, in update
    _LOGGER.debug("Status = %s", status)
UnboundLocalError: local variable 'status' referenced before assignment

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
Update __init__.py
Status has a very special purpose - should contain the JSON from `self.client.locations[loc_idx].status()[GWS][0][TCS][0]` (or not).
@zxdavb
Copy link
Contributor

left a comment

A small PR _ I can get it into the next beta if we hurry.

@zxdavb zxdavb self-assigned this Aug 20, 2019

@zxdavb zxdavb changed the title [bugfix] Make sure `status` is defined in EvoBroker.update [bugfix] Exception if vendor's servers are down - 'status' referenced before assignment Aug 20, 2019

@zxdavb zxdavb changed the title [bugfix] Exception if vendor's servers are down - 'status' referenced before assignment [bugfix] Exception if vendor's servers are currently unavailable Aug 20, 2019

@zxdavb zxdavb merged commit 000d3d4 into home-assistant:dev Aug 20, 2019

12 checks passed

CI Build #20190820.43 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing f34b84a...5bc7e21
Details
codecov/project 94% (target 90%)
Details
docs-missing Documentation ok.
@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

and thanks to @WoLpH !

@lock lock bot locked and limited conversation to collaborators Aug 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.