From d12aa9762dcd841661cc4fb384a4700d53b5bef2 Mon Sep 17 00:00:00 2001
From: Armando Neto <abiagion@redhat.com>
Date: Tue, 17 Jul 2018 16:08:49 -0300
Subject: [PATCH] Fix regression: Handle unicode where str is expected
Regression caused by 947ac4bc1f6f4016cf5baf2ecb4577e893bc3948 when
trying to fix a similar issue for clients running Python 3. However,
that fix broke Python 2 clients.
Issue: https://pagure.io/freeipa/issue/7626
Signed-off-by: Armando Neto <abiagion@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
---
ipaclient/remote_plugins/schema.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
index 863d8f19923898c0a531c68189dd01b401e531b4..9d2c8ca9d1d3e820154425c4f9e4e39cd64d6fd1 100644
--- a/ipaclient/remote_plugins/schema.py
+++ b/ipaclient/remote_plugins/schema.py
@@ -602,7 +602,7 @@ def get_package(server_info, client):
s = topic['topic_topic']
if isinstance(s, bytes):
s = s.decode('utf-8')
- module.topic = s.partition('/')[0]
+ module.topic = str(s).partition('/')[0]
else:
module.topic = None
--
2.17.1