[Buildbot-commits] buildbot/buildbot/process step.py,1.59,1.60

Brian Warner warner at users.sourceforge.net
Tue Apr 12 00:28:33 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11709/buildbot/process

Modified Files:
	step.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-34
Creator:  Brian Warner <warner at monolith.lothar.com>

let each RemoteShellCommand gets its own .env dictionary

	* buildbot/process/step.py (RemoteShellCommand.__init__): let each
	RemoteShellCommand gets its own .env dictionary, so that code in
	start() doesn't mutate the original. I think this should fix the
	step_twisted.Trial problem where multiple identical components
	kept getting added to PYTHONPATH= over and over again.


Index: step.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- step.py	9 Dec 2004 10:24:56 -0000	1.59
+++ step.py	12 Apr 2005 00:28:30 -0000	1.60
@@ -271,6 +271,11 @@
                  want_stdout=1, want_stderr=1,
                  timeout=20*60, **kwargs):
         self.command = command # stash .command, set it later
+        if env is not None:
+            # avoid mutating the original master.cfg dictionary. Each
+            # ShellCommand gets its own copy, any start() methods won't be
+            # able to modify the original.
+            env = env.copy()
         args = {'workdir': workdir,
                 'env': env,
                 'want_stdout': want_stdout,





More information about the Commits mailing list