From f924c87fa0561b63a070a5600314666906e36fa6 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Thu, 21 Nov 2019 14:55:38 +0100 Subject: [PATCH] orchestra/run: avoid usage of basestring for py3 Signed-off-by: Kyr Shatskyy --- teuthology/orchestra/run.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/teuthology/orchestra/run.py b/teuthology/orchestra/run.py index f5b46ff42f..8992ec31b7 100644 --- a/teuthology/orchestra/run.py +++ b/teuthology/orchestra/run.py @@ -59,10 +59,10 @@ class RemoteProcess(object): """ self.client = client self.args = args - if isinstance(args, basestring): - self.command = args - else: + if isinstance(args, list): self.command = quote(args) + else: + self.command = args if cwd: self.command = '(cd {cwd} && exec {cmd})'.format( @@ -241,9 +241,6 @@ def quote(args): """ Internal quote wrapper. """ - if isinstance(args, basestring): - return args - def _quote(args): """ Handle quoted string, testing for raw charaters. @@ -253,7 +250,10 @@ def quote(args): yield a.value else: yield pipes.quote(a) - return ' '.join(_quote(args)) + if isinstance(args, list): + return ' '.join(_quote(args)) + else: + return args def copy_to_log(f, logger, loglevel=logging.INFO, capture=None): -- 2.39.5