From 7900a0976309cdde18f34f2f2b194262da039ff2 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Fri, 24 Jan 2020 17:20:05 -0500 Subject: [PATCH] archive: fix DebianSourcePackage implementation of _source_urls() --- ubuntutools/archive.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index 7a4706b..2ee7c7d 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -665,13 +665,10 @@ class DebianSourcePackage(SourcePackage): def _source_urls(self, name): "Generator of sources for name" - wrapped_iterator = super(DebianSourcePackage, self)._source_urls(name) - while True: - try: - yield next(wrapped_iterator) - except StopIteration: - break - yield self.snapshot_files[name] + for url in super(DebianSourcePackage, self)._source_urls(name): + yield url + if name in self.snapshot_files: + yield self.snapshot_files[name] def _binary_files_info(self, arch, name, ext): for f in self.snapshot_package.getBinaryFiles(arch=arch, name=name, ext=ext):