Merge ~alexmurray/ubuntu-dev-tools:fix-ppa-pull-lp-1938659 into ubuntu-dev-tools:master

Proposed by Alex Murray
Status: Merged
Merged at revision: 511aa3d80c237ded8031cbebf648a465251d623f
Proposed branch: ~alexmurray/ubuntu-dev-tools:fix-ppa-pull-lp-1938659
Merge into: ubuntu-dev-tools:master
Diff against target: 21 lines (+2/-2)
1 file modified
ubuntutools/archive.py (+2/-2)
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+406518@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

Oops forgot to specify in the merge request description - this is to resolve https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1938659

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

perhaps you can use `yield from` instead of the loop? Also, is the same change needed in the private ppa cases visible in the same hunk?

Lastly, if changes are going to be needed, please include the bug reference (either LP:# or url) in the commit message.

Revision history for this message
Alex Murray (alexmurray) wrote :

Thanks for the hint re `yield from` - much nicer. This change is not needed in the private PPA case since that just returns a string, not a generator. Will redo the commit with the bug reference too. Cheers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py
2index 4efac42..3d7561e 100644
3--- a/ubuntutools/archive.py
4+++ b/ubuntutools/archive.py
5@@ -674,14 +674,14 @@ class PersonalPackageArchiveSourcePackage(UbuntuSourcePackage):
6 if self.getArchive().private:
7 yield self._private_ppa_url(name)
8 else:
9- yield super()._source_urls(name)
10+ yield from super()._source_urls(name)
11
12 def _binary_urls(self, name, bpph):
13 "Generator of URLs for name"
14 if self.getArchive().private:
15 yield self._private_ppa_url(name)
16 else:
17- yield super()._binary_urls(name, bpph)
18+ yield from super()._binary_urls(name, bpph)
19
20
21 class UbuntuCloudArchiveSourcePackage(PersonalPackageArchiveSourcePackage):

Subscribers

People subscribed via source and target branches