fix #343 - close fds of mkstemp for messages

Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
remotes/origin/random_dot_cdist
Nico Schottelius 10 years ago
parent dd562befc9
commit 77b96b97c8
  1. 8
      cdist/message.py

8
cdist/message.py vendored

@ -37,11 +37,13 @@ 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')
self._copy_messages()
os.close(in_fd)
os.close(out_fd)
self._copy_messages()
@property
def env(self):

Loading…
Cancel
Save