Summary: | Fix Analyze ChangeLog's entry processing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Peter Gal <galpeter> | ||||
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, dpranke, glenn, ossy, rniwa | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Peter Gal
2013-05-16 05:17:29 PDT
Created attachment 201944 [details]
proposed patch
This'll initialize the 'i' variable to 0. Also it'll remove the unneeded i+=1 line (the i is incremented automatically by the for loop's enumerate).
Comment on attachment 201944 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review > Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 > + i = 0 Instead of doing that, exit early when "not entries". (In reply to comment #2) > (From update of attachment 201944 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review > > > Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 > > + i = 0 > > Instead of doing that, exit early when "not entries". That was my first try, but the 'entries' is a generator. So to do the early exit first we need to ask for one element then check if there is any and do some magic with it. Comment on attachment 201944 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review >>> Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 >>> + i = 0 >> >> Instead of doing that, exit early when "not entries". > > That was my first try, but the 'entries' is a generator. So to do the early exit first we need to ask for one element then check if there is any and do some magic with it. I see. Makes sense. Comment on attachment 201944 [details] proposed patch Clearing flags on attachment: 201944 Committed r150237: <http://trac.webkit.org/changeset/150237> All reviewed patches have been landed. Closing bug. |