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