hgpoller throws an exception when change_list is empty

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
5 years ago

People

(Reporter: bhearsum, Assigned: bhearsum)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This list comprehension doesn't work right with an empty list:
        self.lastChange = max(self.lastPoll, *[c["pubDate"] for c in
                                                   change_list])
(Assignee)

Comment 1

11 years ago
Created attachment 300469 [details] [diff] [review]
[checked in] don't use list comprehension in an empty list
Attachment #300469 - Flags: review?(ted.mielczarek)
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+
(Assignee)

Comment 3

11 years ago
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
(Assignee)

Updated

11 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 11 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.