1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00
community.general/plugins
mirabilos eb6337c0c9
omapi_host: fix bytes vs. str confusion (#11001)
* omapi_host: fix bytes vs. str confusion

After an update of the control node from Debian
bookworm to trixie, the omapi_host module fails to
work with the error message:

Key of type 'bytes' is not JSON serializable by the
'module_legacy_m2c' profile.

https://github.com/ansible/ansible/issues/85937 had the
same error, but the fix is a bit more intricate here
because the result dict is dynamically generated from
an API response object.

This also fixes unpacking the MAC and IP address and
hardware type, which were broken for Python3.

* Merge suggestion for changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* do not unpack_ip twice

Noticed by Felix Fontein <felix@fontein.de>

* mention py3k in changelog fragment, too

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-30 20:19:06 +01:00
..
action Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
become Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
cache Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
callback Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
connection Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
doc_fragments Cleanup: remove unicode prefix, remove explicit inheritance from object (#11015) 2025-10-30 20:17:10 +01:00
filter Cleanup: remove unicode prefix, remove explicit inheritance from object (#11015) 2025-10-30 20:17:10 +01:00
inventory Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
lookup Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
module_utils Cleanup: use super() instead of super(__class__, self) (#11016) 2025-10-30 20:17:26 +01:00
modules omapi_host: fix bytes vs. str confusion (#11001) 2025-10-30 20:19:06 +01:00
plugin_utils CI: add type checking (#10997) 2025-10-29 17:13:38 +00:00
test Cleanup: remove unicode prefix, remove explicit inheritance from object (#11015) 2025-10-30 20:17:10 +01:00