Skip to content

Commit

Permalink
redfish_utils: fix language check (#8613)
Browse files Browse the repository at this point in the history
* redfish_utils: fix language check

* add fragment file

* typo

* improve words

* improve words based on suggestion

---------

Co-authored-by: Mike Koreneff <[email protected]>
  • Loading branch information
mkoreneff and Mike Koreneff authored Jul 12, 2024
1 parent e794fa7 commit ca8ecb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/8613-redfish_utils-language.yaml
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion plugins/module_utils/redfish_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3833,7 +3833,7 @@ def check_location_uri(self, resp_data, resp_uri):
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
Expand Down

0 comments on commit ca8ecb1

Please sign in to comment.