[llvm-commits] [llvm] r163469 - /llvm/trunk/utils/lit/lit/Util.py
NAKAMURA Takumi
geek4civic at gmail.com
Sat Sep 8 05:07:24 PDT 2012
Author: chapuni
Date: Sat Sep 8 07:07:24 2012
New Revision: 163469
URL: http://llvm.org/viewvc/llvm-project?rev=163469&view=rev
Log:
lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.
Modified:
llvm/trunk/utils/lit/lit/Util.py
Modified: llvm/trunk/utils/lit/lit/Util.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/Util.py?rev=163469&r1=163468&r2=163469&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/Util.py (original)
+++ llvm/trunk/utils/lit/lit/Util.py Sat Sep 8 07:07:24 2012
@@ -56,7 +56,7 @@
paths = os.environ.get('PATH','')
# Check for absolute match first.
- if os.path.exists(command):
+ if os.path.isfile(command):
return command
# Would be nice if Python had a lib function for this.
More information about the llvm-commits
mailing list