[Lldb-commits] [lldb] r352701 - [Python] String(s) and bytes are two different entities in 3.7.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 30 16:11:33 PST 2019


Author: davide
Date: Wed Jan 30 16:11:33 2019
New Revision: 352701

URL: http://llvm.org/viewvc/llvm-project?rev=352701&view=rev
Log:
[Python] String(s) and bytes are two different entities in 3.7.

So, we need an explicit call to decode() here to let it work with
both interpreters. Fixes TestXMMRegisters on 3.7.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/decorators.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=352701&r1=352700&r2=352701&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Wed Jan 30 16:11:33 2019
@@ -803,7 +803,7 @@ def skipUnlessFeature(feature):
         if platform.system() == 'Darwin':
             try:
                 DEVNULL = open(os.devnull, 'w')
-                output = subprocess.check_output(["/usr/sbin/sysctl", feature], stderr=DEVNULL)
+                output = subprocess.check_output(["/usr/sbin/sysctl", feature], stderr=DEVNULL).decode("utf-8")
                 # If 'feature: 1' was output, then this feature is available and
                 # the test should not be skipped.
                 if re.match('%s: 1\s*' % feature, output):




More information about the lldb-commits mailing list