[Buildbot-commits] buildbot/buildbot/scripts runner.py,1.58,1.59

Brian Warner warner at users.sourceforge.net
Sun Sep 30 18:03:16 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32672/buildbot/scripts

Modified Files:
	runner.py 
Log Message:
[project @ upgrade-master: add basedir to sys.path, for helper classes]

Original author: warner at lothar.com
Date: 2007-09-30 18:02:47+00:00

Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- runner.py	30 Sep 2007 07:14:22 -0000	1.58
+++ runner.py	30 Sep 2007 18:03:14 -0000	1.59
@@ -229,6 +229,14 @@
         #  $BUILDERNAME/builder pickle might be created (with a single
         #  "builder created" event).
 
+        # we put basedir in front of sys.path, because that's how the
+        # buildmaster itself will run, and it is quite common to have the
+        # buildmaster import helper classes from other .py files in its
+        # basedir.
+
+        if sys.path[0] != self.basedir:
+            sys.path.insert(0, self.basedir)
+
         m = BuildMaster(self.basedir)
         # we need to route log.msg to stdout, so any problems can be seen
         # there. But if everything goes well, I'd rather not clutter stdout





More information about the Commits mailing list