Skip to content

Commit

Permalink
catch if there is not SimpleStorage key in self_urls.
Browse files Browse the repository at this point in the history
BerndKue committed Sep 23, 2024

Verified

This commit was signed with the committer’s verified signature.
BerndKue Bernd
1 parent 4615bd8 commit 31d5137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redfish_collector.py
Original file line number Diff line number Diff line change
@@ -367,7 +367,7 @@ def _get_storage_info(self, fields):
if storage_collection:
self._get_storage_details(storage_collection, fields)

if self._urls['SimpleStorage'] and self._inventory['Controllers'] == []:
if self._urls.get('SimpleStorage') and not self._inventory['Controllers']:
# Some Cisco and SuperMicro servers have the storage info in SimpleStorage
simple_storage = self.connect_server(self._urls['SimpleStorage'])
if simple_storage:

0 comments on commit 31d5137

Please sign in to comment.