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

jesus.cea python-checkins at python.org
Fri Oct 5 05:37:17 CEST 2012


http://hg.python.org/cpython/rev/9838ae397a19
changeset:   79488:9838ae397a19
branch:      3.2
parent:      79486:04f39958aea9
user:        Jesus Cea <jcea at jcea.es>
date:        Fri Oct 05 05:21:42 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
@@ -997,8 +997,8 @@
         return default
     target = _follow_symlinks(target)
     try:
-        proc = subprocess.Popen(['file', '-b', '--', target],
-                stdout=subprocess.PIPE, stderr=dev_null)
+        proc = subprocess.Popen(['file', target],
+                stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     except (AttributeError,os.error):
         return default
     output = proc.communicate()[0].decode("latin-1")

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


More information about the Python-checkins mailing list