fix #343 - close fds of mkstemp for messages

Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-12-09 19:54:49 +01:00
parent dd562befc9
commit 77b96b97c8

View file

@ -37,12 +37,14 @@ class Message(object):
self.prefix = prefix self.prefix = prefix
self.global_messages = messages self.global_messages = messages
self.messages_in = tempfile.mkstemp(suffix='.cdist_message_in')[1] in_fd, self.messages_in = tempfile.mkstemp(suffix='.cdist_message_in')
self.messages_out = tempfile.mkstemp(suffix='.cdist_message_out')[1] out_fd, self.messages_out = tempfile.mkstemp(suffix='.cdist_message_out')
os.close(in_fd)
os.close(out_fd)
self._copy_messages() self._copy_messages()
@property @property
def env(self): def env(self):
env = {} env = {}