mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
Use isinstance() instead of type() (#7501)
* Replace type comparisons with isinstance() checks. * Add changelog.
This commit is contained in:
parent
0304989392
commit
48e860be20
4 changed files with 5 additions and 3 deletions
|
@ -3708,7 +3708,7 @@ class RedfishUtils(object):
|
|||
# WORKAROUND
|
||||
# HPE systems with iLO 4 will have BIOS Attribute Registries location URI as a dictionary with key 'extref'
|
||||
# Hence adding condition to fetch the Uri
|
||||
if type(loc['Uri']) is dict and "extref" in loc['Uri'].keys():
|
||||
if isinstance(loc['Uri'], dict) and "extref" in loc['Uri'].keys():
|
||||
rsp_uri = loc['Uri']['extref']
|
||||
if not rsp_uri:
|
||||
msg = "Language 'en' not found in BIOS Attribute Registries location, URI: %s, response: %s"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue