Get rid of the pipes moudle
I was deprecated in 3.11 and was removed in Python 3.13 . Change-Id: I7779950d8a7166aee087021586a664bdb8238535
This commit is contained in:
parent
d51a0c6e0d
commit
45e0268d18
@ -12,9 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import re
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from ..exceptions import ExecuteRuntimeError
|
from ..exceptions import ExecuteRuntimeError
|
||||||
@ -38,8 +39,7 @@ def execute(cmd, workdir=None, can_fail=True, mask_list=None,
|
|||||||
repl_list = [("'", "'\\''")]
|
repl_list = [("'", "'\\''")]
|
||||||
|
|
||||||
if not isinstance(cmd, str):
|
if not isinstance(cmd, str):
|
||||||
import pipes
|
masked = ' '.join((shlex.quote(i) for i in cmd))
|
||||||
masked = ' '.join((pipes.quote(i) for i in cmd))
|
|
||||||
else:
|
else:
|
||||||
masked = cmd
|
masked = cmd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user