[issue9560] platform.py: use -b option for file command in _syscmd_file()
Marc-Andre Lemburg
report at bugs.python.org
Fri Aug 13 12:35:53 CEST 2010
Marc-Andre Lemburg <mal at egenix.com> added the comment:
Éric Araujo wrote:
>
> Éric Araujo <merwok at netwok.org> added the comment:
>
> Is it guaranteed that the -b option will be present in every version of file?
Looking at the only use case of _syscmd_file(), it may not even be worth
the trouble of adding the -b option. Fixing the doc-string may be enough:
# Get data from the 'file' system command
if executable:
output = _syscmd_file(executable, '')
else:
output = ''
...
# Split the output into a list of strings omitting the filename
fileout = _architecture_split(output)[1:]
Note how architecture() already chops off the filename, so it
relies on the existing behavior, rather than the one described
in the doc-string of _syscmd_file().
Sorry, Victor, for not spotting this earlier on.
----------
title: platform.py: use -b option for file command in _syscmd_file() -> platform.py: use -b option for file command in _syscmd_file()
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9560>
_______________________________________
More information about the Python-bugs-list
mailing list