archive: Fix PersonalPackageArchiveSourcePackage to yield URLs

Yielding the result of super()_source_urls() / _binary_urls() yields the
generator object itself which generates the list of URLs - not the URLs
which would be returned from this generator. Instead use yield from which
forwards the yield onto the generator object itself.

Fixes LP: #1938659

Signed-off-by: Alex Murray <alex.murray@canonical.com>
This commit is contained in:
Alex Murray 2021-08-03 10:39:55 +09:30
parent 3f0d63d5b6
commit 296e498fe9
No known key found for this signature in database
GPG Key ID: F498D2D9DE7DAD9C

View File

@ -674,14 +674,14 @@ class PersonalPackageArchiveSourcePackage(UbuntuSourcePackage):
if self.getArchive().private:
yield self._private_ppa_url(name)
else:
yield super()._source_urls(name)
yield from super()._source_urls(name)
def _binary_urls(self, name, bpph):
"Generator of URLs for name"
if self.getArchive().private:
yield self._private_ppa_url(name)
else:
yield super()._binary_urls(name, bpph)
yield from super()._binary_urls(name, bpph)
class UbuntuCloudArchiveSourcePackage(PersonalPackageArchiveSourcePackage):