Message 172055 - Python tracker
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!?)