mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix regression: Handle unicode where str is expected
Regression caused by 947ac4bc1f
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>
This commit is contained in:
parent
4b2af2570a
commit
717d59e2fe
@ -608,7 +608,7 @@ def get_package(server_info, client):
|
|||||||
s = topic['topic_topic']
|
s = topic['topic_topic']
|
||||||
if isinstance(s, bytes):
|
if isinstance(s, bytes):
|
||||||
s = s.decode('utf-8')
|
s = s.decode('utf-8')
|
||||||
module.topic = s.partition('/')[0]
|
module.topic = str(s).partition('/')[0]
|
||||||
else:
|
else:
|
||||||
module.topic = None
|
module.topic = None
|
||||||
|
|
||||||
|
@ -180,3 +180,10 @@ class TestIPACommand(IntegrationTest):
|
|||||||
["ipa", "console", filename],
|
["ipa", "console", filename],
|
||||||
)
|
)
|
||||||
assert "ipalib.config.Env" in result.stdout_text
|
assert "ipalib.config.Env" in result.stdout_text
|
||||||
|
|
||||||
|
def test_list_help_topics(self):
|
||||||
|
result = self.master.run_command(
|
||||||
|
["ipa", "help", "topics"],
|
||||||
|
raiseonerr=False
|
||||||
|
)
|
||||||
|
assert result.returncode == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user