[Python-checkins] cpython (2.7): #16112: platform.architecture does not correctly escape argument to

jesus.cea python-checkins at python.org
Fri Oct 5 05:19:03 CEST 2012


http://hg.python.org/cpython/rev/19d37c8d1882
changeset:   79487:19d37c8d1882
branch:      2.7
parent:      79485:b94a9ff13199
user:        Jesus Cea <jcea at jcea.es>
date:        Fri Oct 05 05:18:47 2012 +0200
summary:
  #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch

files:
  Lib/platform.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -1045,8 +1045,8 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list