Use isinstance() instead of type() (#7501)

* Replace type comparisons with isinstance() checks.

* Add changelog.
This commit is contained in:
Felix Fontein 2023-11-08 13:20:19 +01:00 committed by GitHub
parent 0304989392
commit 48e860be20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -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"