mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41: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 @@ def find_defaults (self): | ||||||
| 
 | 
 | ||||||
|         optional = ['test/test*.py'] |         optional = ['test/test*.py'] | ||||||
|         for pattern in optional: |         for pattern in optional: | ||||||
|             files = glob (pattern) |             files = filter (os.path.isfile, glob (pattern)) | ||||||
|             if files: |             if files: | ||||||
|                 self.files.extend (files) |                 self.files.extend (files) | ||||||
| 
 | 
 | ||||||
|  | @ -338,7 +338,7 @@ def read_manifest (self): | ||||||
| 
 | 
 | ||||||
|             # Single word, no bang: it's a "simple include pattern" |             # Single word, no bang: it's a "simple include pattern" | ||||||
|             elif not exclude: |             elif not exclude: | ||||||
|                 matches = glob (pattern) |                 matches = filter (os.path.isfile, glob (pattern)) | ||||||
|                 if matches: |                 if matches: | ||||||
|                     self.files.extend (matches) |                     self.files.extend (matches) | ||||||
|                 else: |                 else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Greg Ward
						Greg Ward