This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: suprocess cannot handle shell arguments
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: dr7eus, georg.brandl
Priority: normal Keywords:

Created on 2005-11-16 08:23 by dr7eus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg26887 - (view) Author: Pierre Ossman (dr7eus) Date: 2005-11-16 08:23
If you try and include arguments to the shell in
subprocess you get a traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/subprocess.py", line 558, in
__init__
    errread, errwrite)
  File "/usr/lib/python2.4/subprocess.py", line 907, in
_execute_child
    args = ["/bin/sh", "-c"] + args
TypeError: can only concatenate list (not "tuple") to list

A simple list() should solve the issue.
msg26888 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-10-29 09:05
Logged In: YES 
user_id=849994

Fixed in rev. 52522, 52523 (2.5).
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42599
2005-11-16 08:23:41dr7euscreate