[tests] Make string encoding issues explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2013-08-07 23:09:24 +00:00
parent 4229b95d66
commit f34117d849

View File

@ -283,11 +283,11 @@ import subprocess
try:
llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
stdout = subprocess.PIPE)
except OSError, why:
print "Could not find llc in " + llvm_tools_dir
except OSError:
print("Could not find llc in " + llvm_tools_dir)
exit(42)
if re.search(r'with assertions', llc_cmd.stdout.read()):
if re.search(r'with assertions', llc_cmd.stdout.read().decode('ascii')):
config.available_features.add('asserts')
llc_cmd.wait()