pylint: Replace deprecated pipes

`pipes` module is deprecated as of Python 3.11.
https://docs.python.org/3/library/pipes.html#module-pipes:
> Deprecated since version 3.11, will be removed in version 3.13: The
  pipes module is deprecated (see PEP 594 for details).

IPA code used only `quote` function from `pipes` that in turn is
the alias for `shlex.quote` since Python 3.3:
9bce311ea4

Fixes: https://pagure.io/freeipa/issue/9278
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
Stanislav Levin 2022-12-02 18:27:36 +03:00 committed by Florence Blanc-Renaud
parent 4352bd5a50
commit a8dd070992
2 changed files with 2 additions and 3 deletions

View File

@ -25,7 +25,6 @@ import os
import glob
import errno
import shlex
import pipes # pylint: disable=deprecated-module
import shutil
import tempfile
@ -320,7 +319,7 @@ class HTTPInstance(service.Service):
if args[0] != paths.IPA_SERVER_GUARD:
self.backup_state('certmonger_ipa_helper', helper)
args = [paths.IPA_SERVER_GUARD] + args
helper = ' '.join(pipes.quote(a) for a in args)
helper = ' '.join(shlex.quote(a) for a in args)
ca_iface.Set('org.fedorahosted.certmonger.ca',
'external-helper', helper)
finally:

View File

@ -33,7 +33,7 @@ import copy
import subprocess
import tempfile
import time
from pipes import quote # pylint: disable=deprecated-module
from shlex import quote
import configparser
from contextlib import contextmanager
from pkg_resources import parse_version