Skip to content

Commit a8e7ddf

Browse files
committed
Handle any object type in quote function
1 parent e9848d2 commit a8e7ddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

executor/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ def reset(self):
19841984

19851985
def quote(*args):
19861986
"""
1987-
Quote a string or a sequence of strings to be used as command line argument(s).
1987+
Quote an object or a sequence of objects to be used as command line argument(s).
19881988
19891989
This function is a simple wrapper around :func:`pipes.quote()` which
19901990
adds support for quoting sequences of strings (lists and tuples). For
@@ -2007,7 +2007,7 @@ def quote(*args):
20072007
value = args[0]
20082008
if not isinstance(value, (list, tuple)):
20092009
return pipes.quote(value)
2010-
return ' '.join(map(quote, value))
2010+
return ' '.join(map(quote, (str(e) for e in value)))
20112011

20122012

20132013
def which(program, mode=os.F_OK | os.X_OK, path=None):

0 commit comments

Comments
 (0)