]> granicus.if.org Git - python/commitdiff
Filter 'glob()' results so we only look at regular files.
authorGreg Ward <gward@python.net>
Sun, 3 Oct 1999 21:09:14 +0000 (21:09 +0000)
committerGreg Ward <gward@python.net>
Sun, 3 Oct 1999 21:09:14 +0000 (21:09 +0000)
Lib/distutils/command/dist.py

index 3f309745ad0d533dda978a39f07479dd00567c54..99a05225bf144d305177a1461b40123cd188721b 100644 (file)
@@ -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: