Skip to content

Commit

Permalink
#16112: platform.architecture does not correctly escape argument to /…
Browse files Browse the repository at this point in the history
…usr/bin/file. Fix original patch
  • Loading branch information
jcea committed Oct 5, 2012
1 parent adc8211 commit 685fffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/platform.py
Expand Up @@ -997,8 +997,8 @@ def _syscmd_file(target,default=''):
return default
target = _follow_symlinks(target)
try:
proc = subprocess.Popen(['file', '-b', '--', target],
stdout=subprocess.PIPE, stderr=dev_null)
proc = subprocess.Popen(['file', target],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except (AttributeError,os.error):
return default
output = proc.communicate()[0].decode("latin-1")
Expand Down

0 comments on commit 685fffa

Please sign in to comment.