* src/Utils.py (search_for): check for directory

svn: r2379
This commit is contained in:
Don Allingham 2003-11-25 21:34:39 +00:00
parent b3c1dfe8aa
commit a335e3ab0b

View File

@ -590,7 +590,7 @@ def gformat(val):
def search_for(name):
for i in os.environ['PATH'].split(':'):
fname = os.path.join(i,name)
if os.access(fname,os.X_OK):
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
return 1
return 0