mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +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'] | ||||
|         for pattern in optional: | ||||
|             files = glob (pattern) | ||||
|             files = filter (os.path.isfile, glob (pattern)) | ||||
|             if files: | ||||
|                 self.files.extend (files) | ||||
| 
 | ||||
|  | @ -338,7 +338,7 @@ def read_manifest (self): | |||
| 
 | ||||
|             # 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
	
	 Greg Ward
						Greg Ward