[Buildbot-commits] buildbot/buildbot/slave bot.py,1.16,1.17

Brian Warner warner at users.sourceforge.net
Wed Feb 8 20:50:32 UTC 2006


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

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

add --umask= argument to the buildslave


Index: bot.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/bot.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- bot.py	14 Oct 2005 19:42:39 -0000	1.16
+++ bot.py	8 Feb 2006 20:50:30 -0000	1.17
@@ -457,7 +457,7 @@
     # exactly once.
 
     def __init__(self, host, port, name, passwd, basedir, keepalive,
-                 usePTY, keepaliveTimeout=30, debugOpts={}):
+                 usePTY, keepaliveTimeout=30, umask=None, debugOpts={}):
         service.MultiService.__init__(self)
         self.debugOpts = debugOpts.copy()
         bot = self.botClass(basedir, usePTY)
@@ -465,6 +465,7 @@
         self.bot = bot
         if keepalive == 0:
             keepalive = None
+        self.umask = umask
         bf = self.bf = BotFactory(keepalive, keepaliveTimeout)
         bf.startLogin(credentials.UsernamePassword(name, passwd), client=bot)
         self.connection = c = internet.TCPClient(host, port, bf)
@@ -479,6 +480,11 @@
         self.bf.perspective.notifyOnDisconnect(lambda res: d.callback(None))
         return d
 
+    def startService(self):
+        if self.umask is not None:
+            os.umask(self.umask)
+        service.MultiService.startService(self)
+
     def stopService(self):
         self.bf.continueTrying = 0
         self.bf.stopTrying()





More information about the Commits mailing list