Skip to content

Fix crash when wp2g key is missing in AP infos#24

Merged
DasSkelett merged 1 commit into
mainfrom
fix-crash-wp2g-none
Apr 29, 2026
Merged

Fix crash when wp2g key is missing in AP infos#24
DasSkelett merged 1 commit into
mainfrom
fix-crash-wp2g-none

Conversation

@DasSkelett
Copy link
Copy Markdown
Member

@DasSkelett DasSkelett commented Apr 29, 2026

Omada_respondd was in a crash loop on gw04 due to the following exception:

Traceback (most recent call last):
  File "/opt/omada_respondd/respondd.py", line 14, in <module>
    main()
  File "/opt/omada_respondd/respondd.py", line 10, in main
    extResponddClient.start()
  File "/opt/omada_respondd/omada_respondd/respondd_client.py", line 405, in start
    self._aps = omada_client.get_infos()
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/omada_respondd/omada_respondd/omada_client.py", line 298, in get_infos
    if wp2g.get("actualChannel", None) is not None:
       ^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
omada_respondd.service: Main process exited, code=exited, status=1/FAILURE

Don't know why some access point doesn't have this info suddenly, but in any case we need to handle it gracefully.
The code now includes a None-check before trying to access any properties of wp2g/wp5g.

@DasSkelett DasSkelett requested a review from a team as a code owner April 29, 2026 18:59
@DasSkelett DasSkelett added bug Something isn't working python Pull requests that update Python code labels Apr 29, 2026
@DasSkelett DasSkelett merged commit 19daa64 into main Apr 29, 2026
5 checks passed
@DasSkelett DasSkelett deleted the fix-crash-wp2g-none branch April 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants