mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
parent
4352bd5a50
commit
a8dd070992
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user