[Buildbot-commits] buildbot/buildbot master.py,1.64,1.65
Brian Warner
warner at users.sourceforge.net
Wed Apr 27 10:35:31 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16033/buildbot
Modified Files:
master.py
Log Message:
(BuildMaster.loadChanges): fix change_svc setup, it was completely broken for
new buildmasters (those which did not have a 'change.pck' already saved.
Index: master.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- master.py 26 Apr 2005 02:13:47 -0000 1.64
+++ master.py 27 Apr 2005 10:35:27 -0000 1.65
@@ -611,13 +611,14 @@
self.statusTargets = []
self.bots = []
- self.useChanges(ChangeMaster())
self.readConfig = False
def __getstate__(self):
state = service.MultiService.__getstate__(self)
state = styles.Versioned.__getstate__(self, state)
+ if state.has_key('change_svc'):
+ del state['change_svc']
return state
def upgradeToVersion1(self):
@@ -655,8 +656,8 @@
self.change_svc.basedir = self.basedir
self.change_svc.botmaster = self.botmaster
self.change_svc.setName("changemaster")
- self.change_svc.setServiceParent(self)
self.dispatcher.changemaster = self.change_svc
+ self.change_svc.setServiceParent(self)
def loadChanges(self):
filename = os.path.join(self.basedir, "changes.pck")
@@ -664,10 +665,10 @@
changes = pickle.load(open(filename, "r"))
except IOError:
log.msg("changes.pck missing, using new one")
- return # __init__ created a ChangeMaster() already, just use it
+ changes = ChangeMaster()
except EOFError:
log.msg("corrupted changes.pck, using new one")
- return # ditto
+ changes = ChangeMaster()
self.useChanges(changes)
def _handleSIGHUP(self, *args):
@@ -888,6 +889,8 @@
return defer.DeferredList(dl)
def loadConfig_Sources(self, sources):
+ log.msg("loadConfig_Sources, change_svc is", self.change_svc,
+ self.change_svc.parent)
# shut down any that were removed, start any that were added
oldsources = list(self.change_svc)
dl = [self.change_svc.removeSource(source)
More information about the Commits
mailing list