eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.13k stars 723 forks source link

Add tests for reasoncode comparison #801

Closed PierreF closed 5 months ago

PierreF commented 5 months ago

ReasonCodes object could be compared to a number but they couldn't:

The string comparison if useful IMO. The inequality is there more for compatibility with code that used to do rc > 0 and want to do reason_code > 0.