Skip to content

Commit

Permalink
Merge pull request #5 from ingdb/bugfix/sdr_not_always_with_device_id…
Browse files Browse the repository at this point in the history
…_string

sdr does not always have a device_id_string
  • Loading branch information
hthiery authored Oct 29, 2024
2 parents 842a3e0 + 52ec478 commit f545204
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/IpmiLibrary/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def log_sdr_list(self):

def _find_sdr_by_name(self, name):
for sdr in self._sdr_list:
if sdr.device_id_string == name:
return sdr
if hasattr(sdr, 'device_id_string'):
if sdr.device_id_string == name:
return sdr

raise AssertionError('SDR with name "%s" not found in list' % (name))

Expand Down

0 comments on commit f545204

Please sign in to comment.