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

fix: handle ConnectionRefusedError #19

Merged
merged 2 commits into from
Sep 26, 2022
Merged

fix: handle ConnectionRefusedError #19

merged 2 commits into from
Sep 26, 2022

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 26, 2022

Fixes

2022-09-26 00:34:47.797 ERROR (MainThread) [homeassistant.setup] Error during setup of component bluetooth
Traceback (most recent call last):
  File "/root/home-assistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/root/home-assistant/homeassistant/components/bluetooth/__init__.py", line 284, in async_setup
    await manager.async_setup()
  File "/root/home-assistant/homeassistant/components/bluetooth/manager.py", line 220, in async_setup
    history = await async_load_history_from_system()
  File "/root/home-assistant/homeassistant/components/bluetooth/util.py", line 31, in async_load_history_from_system
    await bluez_dbus.load()
  File "/root/home-assistant/venv/lib/python3.9/site-packages/bluetooth_adapters/__init__.py", line 31, in load
    self._managed_objects = await get_dbus_managed_objects()
  File "/root/home-assistant/venv/lib/python3.9/site-packages/bluetooth_adapters/dbus.py", line 49, in get_dbus_managed_objects
    results = await _get_dbus_managed_objects()
  File "/root/home-assistant/venv/lib/python3.9/site-packages/bluetooth_adapters/dbus.py", line 55, in _get_dbus_managed_objects
    bus = await MessageBus(
  File "/root/home-assistant/venv/lib/python3.9/site-packages/dbus_fast/aio/message_bus.py", line 162, in __init__
    super().__init__(bus_address, bus_type, ProxyObject)
  File "/root/home-assistant/venv/lib/python3.9/site-packages/dbus_fast/message_bus.py", line 98, in __init__
    self._setup_socket()
  File "/root/home-assistant/venv/lib/python3.9/site-packages/dbus_fast/message_bus.py", line 635, in _setup_socket
    raise err
  File "/root/home-assistant/venv/lib/python3.9/site-packages/dbus_fast/message_bus.py", line 608, in _setup_socket
    self._sock.connect(filename)
ConnectionRefusedError: [Errno 111] Connection refused

@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (2ee321a) compared to base (264d63a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #19   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          120       125    +5     
  Branches        23        25    +2     
=========================================
+ Hits           120       125    +5     
Impacted Files Coverage Δ
src/bluetooth_adapters/__init__.py 100.00% <100.00%> (ø)
src/bluetooth_adapters/dbus.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bdraco bdraco merged commit 7e85613 into main Sep 26, 2022
@bdraco bdraco deleted the fix_connection_refused branch September 26, 2022 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant