Skip to content

Commit

Permalink
sdr does not always have a device_id_string
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias committed Oct 28, 2024
1 parent f083d1a commit a7360fe
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 a7360fe

Please sign in to comment.