mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-20 09:21:24 -07: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:
parent
82e1f24d2e
commit
4b84127ef3
4 changed files with 5 additions and 3 deletions
|
@ -1529,7 +1529,7 @@ def delete_and_wait(
|
|||
result[resource_type] = resource
|
||||
return result
|
||||
# oci.wait_until() returns an instance of oci.util.Sentinel in case the resource is not found.
|
||||
if type(wait_response) is not Sentinel:
|
||||
if not isinstance(wait_response, Sentinel):
|
||||
resource = to_dict(wait_response.data)
|
||||
else:
|
||||
resource["lifecycle_state"] = "DELETED"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue