Don't crash if find_executable return None.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 17 Oct 2014 16:07:43 +0000 (16:07 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 17 Oct 2014 16:07:43 +0000 (16:07 +0000)
This was crashing when trying to run the tests on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220048 91177308-0d34-0410-b5e6-96231b3b80d8

test/Bindings/Go/lit.local.cfg

index 0d894fded47fc971ed0933d995b3ea7073a4a76c..8158dd49e7ffe2556db7688554cd0de4f50eb425 100644 (file)
@@ -36,14 +36,14 @@ def fixup_compiler_path(compiler):
     try:
         if path.endswith('/cc') and os.readlink(path) == 'clang':
             args[0] = path[:len(path)-2] + 'clang'
     try:
         if path.endswith('/cc') and os.readlink(path) == 'clang':
             args[0] = path[:len(path)-2] + 'clang'
-    except OSError:
-        skip
+    except AttributeError:
+        pass
 
     try:
         if path.endswith('/c++') and os.readlink(path) == 'clang++':
             args[0] = path[:len(path)-3] + 'clang++'
 
     try:
         if path.endswith('/c++') and os.readlink(path) == 'clang++':
             args[0] = path[:len(path)-3] + 'clang++'
-    except OSError:
-        skip
+    except AttributeError:
+        pass
 
     return ' '.join([pipes.quote(arg) for arg in args])
 
 
     return ' '.join([pipes.quote(arg) for arg in args])