Author: davide Date: Fri Jan 26 13:46:10 2018 New Revision: 323566 URL: http://llvm.org/viewvc/llvm-project?rev=323566&view=rev Log: [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). Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=323566&r1=323565&r2=323566&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Jan 26 13:46:10 2018 @@ -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) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits