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

[PR #8613/ca8ecb1d backport][stable-9] redfish_utils: fix language check (#8617)

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>
(cherry picked from commit ca8ecb1df1)

Co-authored-by: Mike Koreneff <mkoreneff@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-07-12 23:23:50 +02:00 committed by GitHub
parent 78a02b84f3
commit 92dcf1e0b2
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'] vendor = self._get_vendor()['Vendor']
rsp_uri = "" rsp_uri = ""
for loc in resp_data['Location']: for loc in resp_data['Location']:
if loc['Language'] == "en": if loc['Language'].startswith("en"):
rsp_uri = loc['Uri'] rsp_uri = loc['Uri']
if vendor == 'HPE': if vendor == 'HPE':
# WORKAROUND # WORKAROUND