Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated pipes module with shlex.quote #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions executor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import errno
import logging
import os
import pipes
import pprint
import shlex
import signal
Expand Down Expand Up @@ -1986,7 +1985,7 @@ def quote(*args):
"""
Quote a string or a sequence of strings to be used as command line argument(s).

This function is a simple wrapper around :func:`pipes.quote()` which
This function is a simple wrapper around :func:`shlex.quote()` which
adds support for quoting sequences of strings (lists and tuples). For
example the following calls are all equivalent::

Expand All @@ -2006,7 +2005,7 @@ def quote(*args):
else:
value = args[0]
if not isinstance(value, (list, tuple)):
return pipes.quote(value)
return shlex.quote(value)
return ' '.join(map(quote, value))


Expand Down