| Index: subprocess2.py
|
| diff --git a/subprocess2.py b/subprocess2.py
|
| index 034463fd20da0dfcad53ff2ccde1e61112cd98ad..4708aadf362ee347cf3d6528acc3c9007c917208 100644
|
| --- a/subprocess2.py
|
| +++ b/subprocess2.py
|
| @@ -158,7 +158,12 @@ def Popen(args, **kwargs):
|
| # with a list because it only tries to execute the first item in the list.
|
| kwargs['shell'] = bool(sys.platform=='win32')
|
|
|
| - tmp_str = ' '.join(args)
|
| + if isinstance(args, basestring):
|
| + tmp_str = args
|
| + elif isinstance(args, (list, tuple)):
|
| + tmp_str = ' '.join(args)
|
| + else:
|
| + raise CalledProcessError(None, args, kwargs.get('cwd'), None, None)
|
| if kwargs.get('cwd', None):
|
| tmp_str += '; cwd=%s' % kwargs['cwd']
|
| logging.debug(tmp_str)
|
|
|