Message172055
1.7 - with open(DEV_NULL) as dev_null:
1.8 - proc = subprocess.Popen(['file', '-b', '--', target],
1.9 - stdout=subprocess.PIPE,
stderr=dev_null)
1.9 + proc = subprocess.Popen(['file', target],
1.10 + stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
Errors should be ignored, not written into stderr. subprocess.DEVNULL
was added to Python 3.3, in older version you have to manually call
open the DEV_NULL file.
(Oh by the way, it should be opened in write mode for stderr, not in
read mode!?) |
|
Date |
User |
Action |
Args |
2012-10-05 07:14:51 | vstinner | set | recipients:
+ vstinner, lemburg, jcea, pitrou, python-dev, David.Benjamin |
2012-10-05 07:14:51 | vstinner | link | issue16112 messages |
2012-10-05 07:14:50 | vstinner | create | |
|