# HG changeset patch # User GP Orcullo # Date 1675994541 -28800 # Node ID 50935528d3131b2824e1ea3a67b3a474d365e518 # Parent 29bc2bebf1d47ba9bf582d5c4b0dfd864dbe13fd allow passing environment variables to ProcessLogger diff -r 29bc2bebf1d4 -r 50935528d313 util/ProcessLogger.py --- a/util/ProcessLogger.py Mon Feb 06 20:07:51 2023 +0800 +++ b/util/ProcessLogger.py Fri Feb 10 10:02:21 2023 +0800 @@ -78,7 +78,7 @@ no_stdout=False, no_stderr=False, no_gui=True, timeout=None, outlimit=None, errlimit=None, endlog=None, keyword=None, kill_it=False, cwd=None, - encoding=None, output_encoding=None): + encoding=None, output_encoding=None, env=None): self.logger = logger if not isinstance(Command, list): self.Command_str = Command @@ -122,7 +122,8 @@ "cwd": os.getcwd() if cwd is None else cwd, "stdin": subprocess.PIPE, "stdout": subprocess.PIPE, - "stderr": subprocess.PIPE + "stderr": subprocess.PIPE, + "env": env } if no_gui and os.name in ("nt", "ce"):