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

orcherstra/run: don't use pipes, but shlex #1996

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
6 changes: 3 additions & 3 deletions teuthology/orchestra/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import gevent
import gevent.event
import socket
import pipes
import shlex
import logging
import shutil

Expand Down Expand Up @@ -252,7 +252,7 @@ def _quote(args):
if isinstance(a, Raw):
yield a.value
else:
yield pipes.quote(a)
yield shlex.quote(a)
if isinstance(args, list):
return ' '.join(_quote(args))
else:
Expand Down Expand Up @@ -400,7 +400,7 @@ def run(
"""
Run a command remotely. If any of 'args' contains shell metacharacters
that you want to pass unquoted, pass it as an instance of Raw(); otherwise
it will be quoted with pipes.quote() (single quote, and single quotes
it will be quoted with shlex.quote() (single quote, and single quotes
enclosed in double quotes).

:param client: SSHConnection to run the command with
Expand Down