Author vstinner
Recipients David.Benjamin, jcea, lemburg, pitrou, python-dev, vstinner
Date 2012-10-05.07:14:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwauHu15f--Y3A9tFudc0=fLTTzUEb=6EOurpy0hQ=Hocg@mail.gmail.com>
In-reply-to <506E832D.6050804@egenix.com>
Content
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!?)
History
Date User Action Args
2012-10-05 07:14:51vstinnersetrecipients: + vstinner, lemburg, jcea, pitrou, python-dev, David.Benjamin
2012-10-05 07:14:51vstinnerlinkissue16112 messages
2012-10-05 07:14:50vstinnercreate