Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Switch Builder.compareToSetup function to just use a comparison on th…
…e locks list.

This is more uniform and fixes a crash trying to access the .name field of LockAccess variables; I'm not sure why this was doing the comparison manually in the first place...
  • Loading branch information
Daniel Dunbar committed Nov 20, 2009
1 parent a6081f8 commit e092d24
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions buildbot/process/builder.py
Expand Up @@ -438,12 +438,8 @@ def compareToSetup(self, setup):
% (self.slavebuilddir, setup['slavebuilddir']))
if setup['factory'] != self.buildFactory: # compare objects
diffs.append('factory changed')
oldlocks = [(lock.__class__, lock.name)
for lock in self.locks]
newlocks = [(lock.__class__, lock.name)
for lock in setup.get('locks',[])]
if oldlocks != newlocks:
diffs.append('locks changed from %s to %s' % (oldlocks, newlocks))
if setup.get('locks', []) != self.locks:
diffs.append('locks changed from %s to %s' % (self.locks, setup.get('locks')))
if setup.get('nextSlave') != self.nextSlave:
diffs.append('nextSlave changed from %s to %s' % (self.nextSlave, setup['nextSlave']))
if setup.get('nextBuild') != self.nextBuild:
Expand Down

0 comments on commit e092d24

Please sign in to comment.