]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: fix test failure on newer python
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 13 Dec 2023 19:33:20 +0000 (14:33 -0500)
committerAdam King <adking@redhat.com>
Wed, 27 Mar 2024 15:19:01 +0000 (11:19 -0400)
commit689f157e818910eca32aba91b0eadf3648d87cd5
treec5a23fb3f0406d8d0c21114442a8d31ebb84c16a
parent323d23dc228bbcb7f16f188fdc9c0dcb801844be
mgr/cephadm: fix test failure on newer python

Tests that touch this enum fail for me locally but pass in the CI. This
seems to be due to new enum related behavior in Python 3.11.
See: https://blog.pecar.me/python-enum
Instead of fixing it as suggested in the above blog, adding a __str__
method works on all python versions I care to know about.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit a30cbabefe15022284f9e6b6316a204879a17fc0)
src/pybind/mgr/cephadm/utils.py