Summary: | resultsdbpy: Handle case where the previous commit doesn't have the changelog | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||
Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aakash_jain, commit-queue, kocsen_chung, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Jonathan Bedard
2019-07-22 14:42:15 PDT
Created attachment 374639 [details]
Patch
Comment on attachment 374639 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374639&action=review What happens if current commit doesn't have ChangeLog? > Tools/resultsdbpy/resultsdbpy/model/repository.py:323 > if len(current_response.text) == (len(previous_response.text) if previous_response else 0): can we simplify this if-else, this is super confusing. Especially if someone doesn't pay very close attention to the order of parenthesis, this doesn't make sense. > Tools/resultsdbpy/resultsdbpy/model/repository.py:326 > + if not previous_response or len(current_response.text) < len(previous_response.text): Maybe just add another variable previous_response_length and evaluate it beforehand, so as to simplify both the if-else. something like: previous_response_length = 0 if previous_response: previous_response_length = len(previous_response.text) Created attachment 374645 [details]
Patch
Comment on attachment 374645 [details] Patch Clearing flags on attachment: 374645 Committed r247706: <https://trac.webkit.org/changeset/247706> All reviewed patches have been landed. Closing bug. |