STINNER Victor added the comment: 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!?) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16112> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com