Skip to content

Commit

Permalink
Improve error messages if packet not found in EEP
Browse files Browse the repository at this point in the history
Add some more detail to the error messages if a packet cannot be found in the EEP.
  • Loading branch information
RavuAlHemio authored and kipe committed Dec 19, 2021
1 parent 33151e9 commit 80a253b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions enocean/protocol/eep.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ def find_profile(self, bitarray, eep_rorg, rorg_func, rorg_type, direction=None,
return None

if eep_rorg not in self.telegrams.keys():
self.logger.warn('Cannot find rorg in EEP!')
self.logger.warn('Cannot find rorg %s in EEP!', hex(eep_rorg))
return None

if rorg_func not in self.telegrams[eep_rorg].keys():
self.logger.warn('Cannot find func in EEP!')
self.logger.warn('Cannot find rorg %s func %s in EEP!', hex(eep_rorg), hex(rorg_func))
return None

if rorg_type not in self.telegrams[eep_rorg][rorg_func].keys():
self.logger.warn('Cannot find type in EEP!')
self.logger.warn('Cannot find rorg %s func %s type %s in EEP!', hex(eep_rorg), hex(rorg_func), hex(rorg_type))
return None

profile = self.telegrams[eep_rorg][rorg_func][rorg_type]
Expand Down

0 comments on commit 80a253b

Please sign in to comment.