From 90896a9e06b10a5daa26235420d08b745d771f3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 3 Dec 2013 14:36:38 +0100 Subject: [PATCH] update environment with messages environment Signed-off-by: Nico Schottelius --- cdist/exec/local.py | 1 + cdist/message.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cdist/exec/local.py b/cdist/exec/local.py index 28c50eec..f1313eea 100644 --- a/cdist/exec/local.py +++ b/cdist/exec/local.py @@ -168,6 +168,7 @@ class Local(object): if message_prefix: message = cdist.message.Message(message_prefix, self.messages_path) + env.update(message.env) try: if return_output: diff --git a/cdist/message.py b/cdist/message.py index 057c43d3..b840a84d 100644 --- a/cdist/message.py +++ b/cdist/message.py @@ -56,12 +56,14 @@ class Message(object): shutil.copyfile(self.global_messages, self.messages_in) def _cleanup(self): + """remove temporary files""" if os.path.exists(self.messages_in): os.remove(self.messages_in) if os.path.exists(self.messages_out): os.remove(self.messages_out) def _merge_messages(self): + """merge newly written lines into global file""" with open(self.messages_out) as fd: content = fd.readlines()