summaryrefslogtreecommitdiffstats
path: root/Lib/glob.py
diff options
context:
space:
mode:
authorJohannes Gijsbers <jlg@dds.nl>2004-08-30 10:19:56 (GMT)
committerJohannes Gijsbers <jlg@dds.nl>2004-08-30 10:19:56 (GMT)
commitae882f798435266b41a9c8966562102345a3eda5 (patch)
tree56f865bf36c127b6702fa53a5ad72daca0fa6570 /Lib/glob.py
parentd3f61a2de6a9664dde5f98b5d0acdef7a73948dc (diff)
downloadcpython-ae882f798435266b41a9c8966562102345a3eda5.zip
cpython-ae882f798435266b41a9c8966562102345a3eda5.tar.gz
cpython-ae882f798435266b41a9c8966562102345a3eda5.tar.bz2
Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob.
Diffstat (limited to 'Lib/glob.py')
-rw-r--r--Lib/glob.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/glob.py b/Lib/glob.py
index d5e508a..4ba4138 100644
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -13,7 +13,7 @@ def glob(pathname):
"""
if not has_magic(pathname):
- if os.path.exists(pathname):
+ if os.path.lexists(pathname):
return [pathname]
else:
return []
@@ -29,7 +29,7 @@ def glob(pathname):
for dirname in list:
if basename or os.path.isdir(dirname):
name = os.path.join(dirname, basename)
- if os.path.exists(name):
+ if os.path.lexists(name):
result.append(name)
else:
result = []