This is an archive of the discontinued LLVM Phabricator instance.

Fix send and receive of ACK byte in test infrastructure for Python 3.5
ClosedPublic

Authored by amccarth on Apr 25 2016, 4:18 PM.

Details

Summary

Python 3.5 is pickier about the distinction between chars and bytes (and strings and bytearrays) than Python 2.7.

The call to ack_bytes.append(chr(42)) was causing a type error to be thrown (during init, so we didn't see a proper stack trace).

I've used the b'*' syntax which creates a bytearray in Python 3 and a plain string in Python 2. I believe this should work in Python 2, but I'm not in a position to test that. If you want to try patching this in to your build to be sure, it would be appreciated.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth updated this revision to Diff 54938.Apr 25 2016, 4:18 PM
amccarth retitled this revision from to Fix send and receive of ACK byte in test infrastructure for Python 3.5.
amccarth updated this object.
amccarth added a reviewer: tfiala.
amccarth added a subscriber: lldb-commits.
tfiala accepted this revision.Apr 26 2016, 7:41 AM
tfiala edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Apr 26 2016, 7:41 AM
This revision was automatically updated to reflect the committed changes.