try:
if path.endswith('/cc') and os.readlink(path) == 'clang':
args[0] = path[:len(path)-2] + 'clang'
- except AttributeError:
+ except (AttributeError, OSError):
pass
try:
if path.endswith('/c++') and os.readlink(path) == 'clang++':
args[0] = path[:len(path)-3] + 'clang++'
- except AttributeError:
+ except (AttributeError, OSError):
pass
return ' '.join([pipes.quote(arg) for arg in args])