kevthehermit/RATDecoders

[BUG] This statement is always true!

catsuryuu opened this issue · 2 comments

if str(entry.name) == "RC_DATA" or "RCData":

Probably should be if str(entry.name) == "RC_DATA" or str(entry.name) == "RCData":

Yeah, nice find. Indeed, this is not how the "or" operator works in Python (or in any programming language to be honest), this is interpreted as (str(entry.name) == "RC_DATA") or ("RCData") (due to the operator precedence rules). 😄

I have submitted a merge request to fix this.

Thanks, I actually found some time this week to work on converting this to a library with python3 compatibility. Have fixed this in that branch. - https://github.com/kevthehermit/RATDecoders/tree/library