mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[PR #7501/48e860be backport][stable-8] Use isinstance() instead of type() (#7503)
Use isinstance() instead of type() (#7501)
* Replace type comparisons with isinstance() checks.
* Add changelog.
(cherry picked from commit 48e860be20)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -432,7 +432,7 @@ class OcapiUtils(object):
|
||||
else:
|
||||
return response
|
||||
details = response["data"]["Status"].get("Details")
|
||||
if type(details) is str:
|
||||
if isinstance(details, str):
|
||||
details = [details]
|
||||
health_list = response["data"]["Status"]["Health"]
|
||||
return_value = {
|
||||
|
||||
Reference in New Issue
Block a user