forked from ungleich-public/cdist
		
	fix #343 - close fds of mkstemp for messages
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								dd562befc9
							
						
					
				
			
			
				commit
				
					
						77b96b97c8
					
				
			
		
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -37,12 +37,14 @@ class Message(object):
 | 
			
		|||
        self.prefix = prefix
 | 
			
		||||
        self.global_messages = messages
 | 
			
		||||
 | 
			
		||||
        self.messages_in  = tempfile.mkstemp(suffix='.cdist_message_in')[1]
 | 
			
		||||
        self.messages_out = tempfile.mkstemp(suffix='.cdist_message_out')[1]
 | 
			
		||||
        in_fd, self.messages_in  = tempfile.mkstemp(suffix='.cdist_message_in')
 | 
			
		||||
        out_fd, self.messages_out = tempfile.mkstemp(suffix='.cdist_message_out')
 | 
			
		||||
 | 
			
		||||
        os.close(in_fd)
 | 
			
		||||
        os.close(out_fd)
 | 
			
		||||
 | 
			
		||||
        self._copy_messages()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def env(self):
 | 
			
		||||
        env = {}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue