[lldbtestsuite] Don't crash on `None` input for is_exe().

Now the function returns `False`, and the caller can take the
appropriate action (in this case, for --executable, reporting
that the file doesn't exist).

llvm-svn: 323566
This commit is contained in:
Davide Italiano 2018-01-26 21:46:10 +00:00
parent 6806cf9eb5
commit 643b2b9e26
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,8 @@ from ..support import seven
def is_exe(fpath):
"""Returns true if fpath is an executable."""
if fpath == None:
return False
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)