Merge lp://staging/~evfool/update-manager/fix665173 into lp://staging/update-manager

Proposed by Robert Roth
Status: Merged
Merged at revision: 2085
Proposed branch: lp://staging/~evfool/update-manager/fix665173
Merge into: lp://staging/update-manager
Diff against target: 48 lines (+10/-3)
2 files modified
UpdateManager/Core/MyCache.py (+4/-2)
tests/test_changelog.py (+6/-1)
To merge this branch: bzr merge lp://staging/~evfool/update-manager/fix665173
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Robert Roth (community) Approve
Barry Warsaw (community) Approve
Review via email: mp+55663@code.staging.launchpad.net

Description of the change

Show only one error message for sources not supporting changelogs, do not show one for the source and one for the binary source (this is how the message got duplicated).

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Thanks for your contribution. The patch looks okay to me (although I cannot upload it). Have you tried to add a test for this situation?

review: Approve
Revision history for this message
Barry Warsaw (barry) wrote :

Hmm, I guess the only problem could be that if one changelog source gave an HTTPError and then another source gave an BadStatusLine error (for example), you'd only see one of the two error messages, but maybe that's not terrible. If you were to get both errors, you've definitely got problems. ;)

Revision history for this message
Robert Roth (evfool) wrote :

I have tested it manually on a source not supporting changelogs, and the message is only shown once, as expected. Do you mean a unit-test? I think I could do that with a hard-coded launchpad changelog URL, that reports that changelogs are not supported. I'll check, I haven't written any Python unit-tests so fat, but I assume that the right place for this would be another method in the tests/test_changelog.py

Revision history for this message
Barry Warsaw (barry) wrote :

> I have tested it manually on a source not supporting changelogs, and the
> message is only shown once, as expected. Do you mean a unit-test? I think I
> could do that with a hard-coded launchpad changelog URL, that reports that
> changelogs are not supported. I'll check, I haven't written any Python unit-
> tests so fat, but I assume that the right place for this would be another
> method in the tests/test_changelog.py

I think that would be a good place for it. There should be lots of examples in the package to cargo cult from :). Give it a shot! Thanks.

2073. By Robert Roth

Unittest to test if the changelog not supported text gets in the changelog text only once

Revision history for this message
Robert Roth (evfool) wrote :

Really simple unittest added to check if the error message gets only once in the changelog. The package name is hardcoded for a package I have found that does not support changelogs, but not everyone will have that package though, so it could be replaced with a better package.

review: Needs Resubmitting
Revision history for this message
Barry Warsaw (barry) wrote :

Maybe mvo has some thoughts about that. The indentation looks a little weird in the merge proposal, but if the test passes for you then I think it's good. Let's see what Michael has to say. Thanks for doing this!

review: Approve
Revision history for this message
Robert Roth (evfool) wrote :

The requested changes have been commited.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

Hello! Thanks a lot for this branch (and the other branches!). Its getting a bit late here, but I will definitely merge this tonight or tomorrow.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a bunch, merged (I modified the unittest a bit to make it not depend on a sources.list entry that has liboverlay-scrollbar-0.1-0

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: