pykickstart: fix str/bytes format string in error message
This commit is contained in:
parent
fbd48c789f
commit
159a3fb2dd
36
pykickstart/0001-Fix-error-message-in-autopart-command.patch
Normal file
36
pykickstart/0001-Fix-error-message-in-autopart-command.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From f97c8217011ddebe77635d4aea1b4a78cd477d18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
|
||||
<marmarek@invisiblethingslab.com>
|
||||
Date: Wed, 13 Sep 2017 02:53:04 +0200
|
||||
Subject: [PATCH] Fix error message in autopart command
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Invisible Things Lab
|
||||
Cc: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||||
|
||||
Since Python 3.5, %s (which is an alias for %b) require bytes, not str.
|
||||
See PEP 461 for details.
|
||||
Done this way is compatible with both Python 2 and Python 3.
|
||||
|
||||
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||||
---
|
||||
pykickstart/commands/reqpart.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pykickstart/commands/reqpart.py b/pykickstart/commands/reqpart.py
|
||||
index 3defe84..25c1e11 100644
|
||||
--- a/pykickstart/commands/reqpart.py
|
||||
+++ b/pykickstart/commands/reqpart.py
|
||||
@@ -59,7 +59,7 @@ class F23_ReqPart(KickstartCommand):
|
||||
# Using reqpart and autopart at the same time is not allowed.
|
||||
if self.handler.autopart.seen:
|
||||
errorMsg = _("The %s and reqpart commands can't be used at the same time") % \
|
||||
- "autopart"
|
||||
+ "autopart".encode()
|
||||
raise KickstartParseError(formatErrorMsg(self.lineno, msg=errorMsg))
|
||||
|
||||
(opts, _extra) = self.op.parse_args(args=args, lineno=self.lineno)
|
||||
--
|
||||
2.9.5
|
||||
|
@ -24,6 +24,7 @@ Url: http://fedoraproject.org/wiki/pykickstart
|
||||
# The tarball will be in the current directory.
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch0: 0001-Ignore-errors-from-coverage-tests-138.patch
|
||||
Patch1: 0001-Fix-error-message-in-autopart-command.patch
|
||||
Patch2: repo-gpgkey-option.patch
|
||||
Patch3: standard-xgettext.patch
|
||||
BuildArch: noarch
|
||||
@ -79,7 +80,7 @@ the pykickstart package.
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
#patch1 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user