From: Jesus Cea Date: Fri, 5 Oct 2012 03:18:47 +0000 (+0200) Subject: #16112: platform.architecture does not correctly escape argument to /usr/bin/file... X-Git-Tag: v2.7.4rc1~508 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2699c9d24810196a07e0577215ec3beb7ecfb55b;p=thirdparty%2FPython%2Fcpython.git #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch --- diff --git a/Lib/platform.py b/Lib/platform.py index 10b04bde95ef..20b91752f311 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