Skip to content

Commit 685fffa

Browse files
committed
#16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch
1 parent adc8211 commit 685fffa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,8 +997,8 @@ def _syscmd_file(target,default=''):
997997
return default
998998
target = _follow_symlinks(target)
999999
try:
1000-
proc = subprocess.Popen(['file', '-b', '--', target],
1001-
stdout=subprocess.PIPE, stderr=dev_null)
1000+
proc = subprocess.Popen(['file', target],
1001+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
10021002
except (AttributeError,os.error):
10031003
return default
10041004
output = proc.communicate()[0].decode("latin-1")

0 commit comments

Comments
 (0)