[PATCH 2/2] DNFPayload: do not crash when an addon error is unavailable.
Vratislav Podzimek
vpodzime at redhat.com
Wed Mar 12 07:02:38 UTC 2014
The commit message should probably omit the word "error".
On Tue, 2014-03-11 at 15:44 +0100, Ales Kozumplik wrote:
> From: Ales Kozumplik <ales at redhat.com>
>
> Log & disable the addon, it's what YumPayload does.
> ---
> pyanaconda/packaging/dnfpayload.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
> index 50d9df2..8a91af5 100644
> --- a/pyanaconda/packaging/dnfpayload.py
> +++ b/pyanaconda/packaging/dnfpayload.py
> @@ -324,7 +324,11 @@ class DNFPayload(packaging.PackagePayload):
> try:
> dnf_repo.load()
> except dnf.exceptions.RepoError as e:
> - raise packaging.MetadataError(str(e))
> + id_ = dnf_repo.id
> + if id_ == self.baseRepo:
> + raise packaging.MetadataError(str(e))
> + log.info('_sync_metadata: addon repo error: %s', e)
> + self.disableRepo(id_)
>
> @property
> def addOns(self):
Otherwise these both look good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list