Closed Bug 414937 Opened 17 years ago Closed 17 years ago

hgpoller throws an exception when change_list is empty

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

Attachments

(1 file)

This list comprehension doesn't work right with an empty list:
        self.lastChange = max(self.lastPoll, *[c["pubDate"] for c in
                                                   change_list])
Comment on attachment 300469 [details] [diff] [review]
[checked in] don't use list comprehension in an empty list

btw, do you think you could push this upstream?  It's filed in trac:
http://buildbot.net/trac/ticket/76
Attachment #300469 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 300469 [details] [diff] [review]
[checked in] don't use list comprehension in an empty list

Checking in buildbot/changes/hgpoller.py;
/cvsroot/mozilla/tools/buildbot/buildbot/changes/hgpoller.py,v  <--  hgpoller.py
new revision: 1.1.4.1; previous revision: 1.1
done
Attachment #300469 - Attachment description: don't use list comprehension in an empty list → [checked in] don't use list comprehension in an empty list
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: