From 1bed5b20617af24bb39cb9532234903d9d2c4b90 Mon Sep 17 00:00:00 2001 From: Alberth Date: Fri, 16 Jan 2015 21:31:09 +0100 Subject: [PATCH] Build a completely new environment for the sub-process. --- check_lang_compatibility.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_lang_compatibility.py b/check_lang_compatibility.py index c25d393..4b5b9f7 100755 --- a/check_lang_compatibility.py +++ b/check_lang_compatibility.py @@ -58,8 +58,12 @@ def get_langfile_rev(name, rev): @return: Lines wit string names. @rtype: C{list} of C{str} """ + # Copy the environment, and add HGPLAIN + env = dict(kv for kv in os.environ.items()) + env['HGPLAIN'] = '' + cmd = ['hg', 'cat', '-r', rev, name] - txt = subprocess.check_output(cmd, universal_newlines=True, env={'HGPLAIN':''}) + txt = subprocess.check_output(cmd, universal_newlines=True, env=env) lines = [] for line in txt.split('\n'):