diff options
author | Davide Italiano <davide@freebsd.org> | 2018-01-26 21:46:10 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2018-01-26 21:46:10 +0000 |
commit | 643b2b9e26321859f1e9f7fa9912efebfa7560ba (patch) | |
tree | 5b9150c707aa561149767c7ad461ce084baced11 /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | 6806cf9eb5cec7b9a6d17bb2f5e733f70e7d8f22 (diff) | |
download | bcm5719-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/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 2 |
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) |