Ticket #76: hgpoll.diff

File hgpoll.diff, 0.9 kB (added by bhearsum, 1 year ago)

fix traceback when change_list is empty

  • buildbot/changes/hgpoller.py

    old new  
    108108                               when = change["pubDate"], 
    109109                               branch = self.branch) 
    110110            self.parent.addChange(c) 
    111         self.lastChange = max(self.lastPoll, *[c["pubDate"] for c in 
    112                                                    change_list]) 
     111        if len(change_list) > 0: 
     112            self.lastChange = max(self.lastPoll, *[c["pubDate"] for c in 
     113                                                       change_list]) 
     114        else: 
     115            self.lastChange = self.lastPoll 
    113116