[Buildbot-devel] PATCH: environment variables spread over multiple lines

A.T.Hofkamp a.t.hofkamp at tue.nl
Wed Jun 6 08:51:52 UTC 2007


While debugging a PATH problem, I got annoyed with the very long environment 
line, and made the following change:

--- buildbot/slave/commands.py  2006-12-11 06:40:11.000000000 +0100
+++ installed/lib/python/buildbot/slave/commands.py 2007-06-06 
10:38:56.000000000 +0200
@@ -350,9 +350,10 @@
          self.sendStatus({'header': msg+"\n"})

          # then the environment, since it sometimes causes problems
-        msg = " environment: %s" % (self.environ,)
-        log.msg(" " + msg)
-        self.sendStatus({'header': msg+"\n"})
+        for envvar in self.environ.keys():
+            msg = " environment: %s=%s" % (envvar, self.environ[envvar])
+            log.msg(" " + msg)
+            self.sendStatus({'header': msg+"\n"})

          # this will be buffered until connectionMade is called
          if self.initialStdin:

Instead of sending the environment out in one line, it puts each env variable 
on a seperate line making it more readable while debugging.

Maybe something to put into the next release?

Albert




More information about the devel mailing list