summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-10-03 21:09:14 (GMT)
committerGreg Ward <gward@python.net>1999-10-03 21:09:14 (GMT)
commitef93095adb63fa601f8f9be75e62bca082363a82 (patch)
tree89eac75338d4857caebb83862caafc4ce87fa0b3 /Lib
parent3c6204a87fb6da2157ac820a51057dffc8f98d6a (diff)
downloadcpython-ef93095adb63fa601f8f9be75e62bca082363a82.zip
cpython-ef93095adb63fa601f8f9be75e62bca082363a82.tar.gz
cpython-ef93095adb63fa601f8f9be75e62bca082363a82.tar.bz2
Filter 'glob()' results so we only look at regular files.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/dist.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/command/dist.py b/Lib/distutils/command/dist.py
index 3f30974..99a0522 100644
--- a/Lib/distutils/command/dist.py
+++ b/Lib/distutils/command/dist.py
@@ -220,7 +220,7 @@ class Dist (Command):
optional = ['test/test*.py']
for pattern in optional:
- files = glob (pattern)
+ files = filter (os.path.isfile, glob (pattern))
if files:
self.files.extend (files)
@@ -338,7 +338,7 @@ class Dist (Command):
# Single word, no bang: it's a "simple include pattern"
elif not exclude:
- matches = glob (pattern)
+ matches = filter (os.path.isfile, glob (pattern))
if matches:
self.files.extend (matches)
else: