filter out special/hidden files when iterating over explorers
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								5cb5c3bfdf
							
						
					
				
			
			
				commit
				
					
						ef1394f4d1
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -79,7 +79,7 @@ class Explorer(object):
 | 
			
		|||
 | 
			
		||||
    def list_global_explorer_names(self):
 | 
			
		||||
        """Return a list of global explorer names."""
 | 
			
		||||
        return os.listdir(self.local.global_explorer_path)
 | 
			
		||||
        return glob.glob1(self.local.global_explorer_path, '*')
 | 
			
		||||
 | 
			
		||||
    def run_global_explorers(self, out_path):
 | 
			
		||||
        """Run global explorers and save output to files in the given
 | 
			
		||||
| 
						 | 
				
			
			@ -111,7 +111,7 @@ class Explorer(object):
 | 
			
		|||
        """Return a list of explorer names for the given type."""
 | 
			
		||||
        source = os.path.join(self.local.type_path, cdist_type.explorer_path)
 | 
			
		||||
        try:
 | 
			
		||||
            return os.listdir(source)
 | 
			
		||||
            return glob.glob1(source, '*')
 | 
			
		||||
        except EnvironmentError:
 | 
			
		||||
            return []
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue