From ca6604b58be0448e45b2a68d03d4f8dacbceab7b Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Wed, 3 Apr 2024 12:05:20 +0300 Subject: [PATCH] Use raw strings for Python 3 compatibility in old API client code Python 3 enforces checks on \ sequences in strings. Instead of copying over the new mix of normal and raw strings from the server side, turn those strings in the remote plugins to raw mode. Fixes: https://pagure.io/freeipa/issue/9565 Signed-off-by: Alexander Bokovoy Reviewed-By: Rob Crittenden --- ipaclient/remote_plugins/2_164/automember.py | 2 +- ipaclient/remote_plugins/2_164/group.py | 2 +- ipaclient/remote_plugins/2_164/hbactest.py | 2 +- ipaclient/remote_plugins/2_164/trust.py | 2 +- ipaclient/remote_plugins/2_49/automember.py | 2 +- ipaclient/remote_plugins/2_49/group.py | 2 +- ipaclient/remote_plugins/2_49/trust.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ipaclient/remote_plugins/2_164/automember.py b/ipaclient/remote_plugins/2_164/automember.py index 09b5a8d01..f6b941d64 100644 --- a/ipaclient/remote_plugins/2_164/automember.py +++ b/ipaclient/remote_plugins/2_164/automember.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Auto Membership Rule. Bring clarity to the membership of hosts and users by configuring inclusive diff --git a/ipaclient/remote_plugins/2_164/group.py b/ipaclient/remote_plugins/2_164/group.py index ed57c4caa..e18003ecb 100644 --- a/ipaclient/remote_plugins/2_164/group.py +++ b/ipaclient/remote_plugins/2_164/group.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Groups of users Manage groups of users. By default, new groups are POSIX groups. You diff --git a/ipaclient/remote_plugins/2_164/hbactest.py b/ipaclient/remote_plugins/2_164/hbactest.py index b0c49b71b..4b168f3d9 100644 --- a/ipaclient/remote_plugins/2_164/hbactest.py +++ b/ipaclient/remote_plugins/2_164/hbactest.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Simulate use of Host-based access controls HBAC rules control who can access what services on what hosts. diff --git a/ipaclient/remote_plugins/2_164/trust.py b/ipaclient/remote_plugins/2_164/trust.py index 39a563831..c5c8f60e6 100644 --- a/ipaclient/remote_plugins/2_164/trust.py +++ b/ipaclient/remote_plugins/2_164/trust.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Cross-realm trusts Manage trust relationship between IPA and Active Directory domains. diff --git a/ipaclient/remote_plugins/2_49/automember.py b/ipaclient/remote_plugins/2_49/automember.py index 39cdac0b4..2615f9abf 100644 --- a/ipaclient/remote_plugins/2_49/automember.py +++ b/ipaclient/remote_plugins/2_49/automember.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Auto Membership Rule. Bring clarity to the membership of hosts and users by configuring inclusive diff --git a/ipaclient/remote_plugins/2_49/group.py b/ipaclient/remote_plugins/2_49/group.py index 940a113df..4c1515935 100644 --- a/ipaclient/remote_plugins/2_49/group.py +++ b/ipaclient/remote_plugins/2_49/group.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Groups of users Manage groups of users. By default, new groups are POSIX groups. You diff --git a/ipaclient/remote_plugins/2_49/trust.py b/ipaclient/remote_plugins/2_49/trust.py index e3ef33459..c6936cac8 100644 --- a/ipaclient/remote_plugins/2_49/trust.py +++ b/ipaclient/remote_plugins/2_49/trust.py @@ -16,7 +16,7 @@ from ipapython.dnsutil import DNSName if six.PY3: unicode = str -__doc__ = _(""" +__doc__ = _(r""" Cross-realm trusts Manage trust relationship between IPA and Active Directory domains.