diff --git a/src/IpmiLibrary/sdr.py b/src/IpmiLibrary/sdr.py index 0d3ca86..70a06aa 100644 --- a/src/IpmiLibrary/sdr.py +++ b/src/IpmiLibrary/sdr.py @@ -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))