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.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 = {}
|
||||||
|
|
Loading…
Reference in a new issue