diff --git a/pykickstart/0001-Fix-error-message-in-autopart-command.patch b/pykickstart/0001-Fix-error-message-in-autopart-command.patch new file mode 100644 index 0000000..5792dc8 --- /dev/null +++ b/pykickstart/0001-Fix-error-message-in-autopart-command.patch @@ -0,0 +1,36 @@ +From f97c8217011ddebe77635d4aea1b4a78cd477d18 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +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 + +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 +--- + 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 + diff --git a/pykickstart/pykickstart.spec b/pykickstart/pykickstart.spec index 7a6769b..f81951f 100644 --- a/pykickstart/pykickstart.spec +++ b/pykickstart/pykickstart.spec @@ -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