William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1 | From 2729c00f0060beab8537a9bebc796b170949093d Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Tue, 4 May 2021 22:03:30 +0200 |
| 4 | Subject: [PATCH 1/2] dnf/rpm/miscutils.py: fix usage of _() |
| 5 | |
| 6 | Specifically: |
| 7 | - an import of _ was missing |
| 8 | - _ was reused for a different purpose |
| 9 | |
| 10 | Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/1762] |
| 11 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 12 | --- |
| 13 | dnf/rpm/miscutils.py | 3 ++- |
| 14 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/dnf/rpm/miscutils.py b/dnf/rpm/miscutils.py |
| 17 | index 235aaf28f..7e33d4c42 100644 |
| 18 | --- a/dnf/rpm/miscutils.py |
| 19 | +++ b/dnf/rpm/miscutils.py |
| 20 | @@ -22,6 +22,7 @@ import subprocess |
| 21 | import logging |
| 22 | |
| 23 | from dnf.i18n import ucd |
| 24 | +from dnf.i18n import _ |
| 25 | from shutil import which |
| 26 | |
| 27 | |
| 28 | @@ -46,7 +47,7 @@ def _verifyPkgUsingRpmkeys(package, installroot): |
| 29 | env={'LC_ALL': 'C'}, |
| 30 | stdout=subprocess.PIPE, |
| 31 | cwd='/') as p: |
| 32 | - data, _ = p.communicate() |
| 33 | + data, err = p.communicate() |
| 34 | if p.returncode != 0 or data != (package.encode('ascii', 'strict') + b': digests signatures OK\n'): |
| 35 | return 0 |
| 36 | else: |
| 37 | -- |
| 38 | 2.31.1 |
| 39 | |