From 2699c9d24810196a07e0577215ec3beb7ecfb55b Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Fri, 5 Oct 2012 05:18:47 +0200 Subject: [PATCH] #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch --- Lib/platform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3