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