1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

redfish_utils: fix language check (#8613)

* redfish_utils: fix language check

* add fragment file

* typo

* improve words

* improve words based on suggestion

---------

Co-authored-by: Mike Koreneff <mkoreneff@hudson-trading.com>
This commit is contained in:
Mike Koreneff 2024-07-12 22:08:43 +01:00 committed by GitHub
parent e794fa74da
commit ca8ecb1df1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- redfish_utils module utils - do not fail when language is not exactly "en" (https://github.com/ansible-collections/community.general/pull/8613).

View file

@ -3833,7 +3833,7 @@ class RedfishUtils(object):
vendor = self._get_vendor()['Vendor']
rsp_uri = ""
for loc in resp_data['Location']:
if loc['Language'] == "en":
if loc['Language'].startswith("en"):
rsp_uri = loc['Uri']
if vendor == 'HPE':
# WORKAROUND