Conversation
|
I believe the remaining unit test failures existed before my code changes. |
|
@f34rdotcom, is there anything I can do to help this PR get merged? I was hoping you could cut a release once this is merged because there are some issues with the Home Assistant integration that this PR as well as #52 and #53 would help fix. |
|
@f34rdotcom, any movement on this? I've heard from a lot of Home Assistant users who are affected by the problem that this PR aims to resolve. I'm happy to continue helping here but I need some direction from you on what's next. |
|
Fix looks good. I agree with you on the tests.. looks to be issues with the tests themselves. @f34rdotcom Merged into dev, but I'll leave the merge from dev -> master and the pypi push up to you. |
This PR updates the
read_linemethod (and an associated function,filter_ad2prot_byte) in theSerialDeviceclass.In
serial_device.py,self._buffer += buf[0]was changed toself._buffer += bufso that the byte objects can be correctly concatenated (buf[0]returns anint, so it was trying to incorrectly concatenate a byte object with anintprior to this change).In
util.py,filter_ad2prot_bytewas updated to correctly return a byte object (as indicated infilter_ad2prot_byte's docstring) instead of anint/strand also to compare against the ASCII values for\nand\rinstead of the string representations.These changes were tested locally and seemed to resolve the issues described in #40 and #47.