[New-bugs-announce] [issue6479] platform.py writes to hard coded platform dependant "dev/null"

John Burnett report at bugs.python.org
Mon Jul 13 21:38:15 CEST 2009


New submission from John Burnett <python at johnburnett.com>:

The functions _syscmd_uname and _syscmd_file are hard-coded to pipe
stderr to "/dev/null", as opposed to os.devnull.  On Windows, this has
the effect of creating a file called "null" to a local "dev" directory
(if the directory exists).

Attached is a fix.  While the _syscmd_uname change isn't entirely
necessary on Windows due to its sys.platform check, I changed both
functions for consistency (and I'm not sure what other platforms might
not have a "/dev/null" either).

----------
components: Library (Lib)
files: devnull.patch
keywords: patch
messages: 90499
nosy: john.burnett
severity: normal
status: open
title: platform.py writes to hard coded platform dependant "dev/null"
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14497/devnull.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6479>
_______________________________________


More information about the New-bugs-announce mailing list