summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-10-05 03:18:47 (GMT)
committerJesus Cea <jcea@jcea.es>2012-10-05 03:18:47 (GMT)
commit2699c9d24810196a07e0577215ec3beb7ecfb55b (patch)
treea03779a576611c200035d55215c7bddd82397f23
parent69e7c9b1fd616c4c7c667e356be478db0df1dabf (diff)
downloadcpython-2699c9d24810196a07e0577215ec3beb7ecfb55b.zip
cpython-2699c9d24810196a07e0577215ec3beb7ecfb55b.tar.gz
cpython-2699c9d24810196a07e0577215ec3beb7ecfb55b.tar.bz2
#16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch
-rwxr-xr-xLib/platform.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 10b04bd..20b9175 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -1045,8 +1045,8 @@ def _syscmd_file(target,default=''):
return default
target = _follow_symlinks(target)
try:
- proc = subprocess.Popen(['file', '-b', '--', target],
- stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
+ proc = subprocess.Popen(['file', target],
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except (AttributeError,os.error):
return default