From a69f3c4d2e5dc5acd8427cb0c5b95caa589ee46f Mon Sep 17 00:00:00 2001 From: Jaroslav Mracek Date: Wed, 12 Apr 2017 09:56:36 +0200 Subject: [PATCH] Not raise an Error if strict=False and --url for download command it introduce a same behavior like without "--url" option Closes: #211 Approved by: ignatenkobrain --- plugins/download.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/download.py b/plugins/download.py index eb123f7f5..aec6af3f2 100644 --- a/plugins/download.py +++ b/plugins/download.py @@ -100,7 +100,9 @@ def run(self): print(url) else: msg = _("Failed to get mirror for package: %s") % pkg.name - raise dnf.exceptions.Error(msg) + if self.base.conf.strict: + raise dnf.exceptions.Error(msg) + logger.warning(msg) return else: locations = self._do_downloads(pkgs) # download rpms