update environment with messages environment
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
2f842d56eb
commit
90896a9e06
2 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue