From ef93095adb63fa601f8f9be75e62bca082363a82 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:09:14 +0000 Subject: Filter 'glob()' results so we only look at regular files. --- Lib/distutils/command/dist.py | 4 ++-- 1 file 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: -- cgit v0.12