forked from OSchip/llvm-project
[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:
parent
6806cf9eb5
commit
643b2b9e26
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue