summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2018-01-26 21:46:10 +0000
committerDavide Italiano <davide@freebsd.org>2018-01-26 21:46:10 +0000
commit643b2b9e26321859f1e9f7fa9912efebfa7560ba (patch)
tree5b9150c707aa561149767c7ad461ce084baced11 /lldb/packages/Python/lldbsuite/test
parent6806cf9eb5cec7b9a6d17bb2f5e733f70e7d8f22 (diff)
downloadbcm5719-llvm-643b2b9e26321859f1e9f7fa9912efebfa7560ba.tar.gz
bcm5719-llvm-643b2b9e26321859f1e9f7fa9912efebfa7560ba.zip
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index c7c60a748e4..f8bfec44236 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -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)
OpenPOWER on IntegriCloud