Skip to content

Commit

Permalink
Merge pull request #1996 from kshtsk/wip-shlex-instead-of-pipes
Browse files Browse the repository at this point in the history
orcherstra/run: don't use pipes, but shlex
  • Loading branch information
zmc authored Aug 7, 2024
2 parents 764449d + f0cf719 commit b5e1bfd
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit b5e1bfd

Please sign in to comment.