mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Filter 'glob()' results so we only look at regular files.
This commit is contained in:
parent
3c6204a87f
commit
ef93095adb
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue