7fda437
From 3e36c99d401530dc026712523a7c445da17ee299 Mon Sep 17 00:00:00 2001
7fda437
From: Marek Blaha <mblaha@redhat.com>
7fda437
Date: Mon, 14 Mar 2022 09:49:52 +0100
7fda437
Subject: [PATCH] Fix processing of download errors (RhBug: 2024527)
7fda437
7fda437
Users with different than english locale are not able to update their
7fda437
systems in case that some of updates are already downloaded in the dnf
7fda437
cache (e.g. using dnf-automatic).
7fda437
7fda437
The error string is taken from librepo target where it is stored
7fda437
untranslated. Therefore we need to compare untranslated versions of the
7fda437
string.
7fda437
7fda437
= changelog =
7fda437
msg:           Fix download errors handling in non-english locales
7fda437
type:          bugfix
7fda437
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2024527
7fda437
---
7fda437
 dnf/repo.py | 2 +-
7fda437
 1 file changed, 1 insertion(+), 1 deletion(-)
7fda437
7fda437
diff --git a/dnf/repo.py b/dnf/repo.py
7fda437
index 1822cf0..ec1a253 100644
7fda437
--- a/dnf/repo.py
7fda437
+++ b/dnf/repo.py
7fda437
@@ -108,7 +108,7 @@ def _download_payloads(payloads, drpm, fail_fast=True):
7fda437
         callbacks = tgt.getCallbacks()
7fda437
         payload = callbacks.package_pload
7fda437
         pkg = payload.pkg
7fda437
-        if err == _('Already downloaded'):
7fda437
+        if err == 'Already downloaded':
7fda437
             errs._skipped.add(pkg)
7fda437
             continue
7fda437
         pkg.repo._repo.expire()
7fda437
--
7fda437
libgit2 1.1.0
7fda437