diff --git a/mock/py/mockbuild/file_downloader.py b/mock/py/mockbuild/file_downloader.py index d4001757e..6506b6d8d 100644 --- a/mock/py/mockbuild/file_downloader.py +++ b/mock/py/mockbuild/file_downloader.py @@ -80,9 +80,9 @@ def _get_inner(cls, url): @classmethod def original_name(cls, localname): """ Get the URL from the local name """ - if not cls.backmap: - return localname - return cls.backmap.get(localname, localname) + if getattr(cls, 'backmap', None): + return cls.backmap.get(localname, localname) + return localname @classmethod def cleanup(cls): diff --git a/releng/release-notes-next/FileDownloader-original_name.bugfix b/releng/release-notes-next/FileDownloader-original_name.bugfix new file mode 100644 index 000000000..6ad6468ad --- /dev/null +++ b/releng/release-notes-next/FileDownloader-original_name.bugfix @@ -0,0 +1,5 @@ +When a `mock --chain --recurse` fails to built at least one package, it is +unable to print a list of failed packages and displays `AttributeError: type +object 'FileDownloader' has no attribute 'backmap'` instead. The `original_name` +method of `FileDownloader` class has been fixed, and the chain build results +displayed as expected ([issue#1345][]). \ No newline at end of file