<div dir="ltr">No it's fine, I was just thinking out loud.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, May 14, 2018 at 12:55 PM Stella Stamenova via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">stella.stamenova added inline comments.<br>
<br>
<br>
================<br>
Comment at: packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py:281-285<br>
+                # In Python 2, sockets return byte strings. In Python 3, sockets return bytes.<br>
+                # If we got bytes (and not a byte string), decode them to a string for later handling.<br>
+                if isinstance(data, bytes) and not isinstance(data, str):<br>
+                    data = data.decode()<br>
+                self._receive(data)<br>
----------------<br>
zturner wrote:<br>
> It's a shame that we're not using lit here.  lit has a nice function `lit.util.to_string` which handles this (and one other strange edge case) correctly.<br>
I looked into using it - but currently none of the lldb tests use functionality from lit and I don't think there's a good way to do so. Let me know if you have a suggestion, but otherwise, I think this is the least impactful change that fixes the tests.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D46773" rel="noreferrer" target="_blank">https://reviews.llvm.org/D46773</a><br>
<br>
<br>
<br>
</blockquote></div>