qubes-installer-qubes-os/pykickstart/0001-Fix-error-message-in-autopart-command.patch
2017-09-13 03:08:04 +02:00

37 lines
1.4 KiB
Diff

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