]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#16112: platform.architecture does not correctly escape argument to /usr/bin/file...
authorJesus Cea <jcea@jcea.es>
Fri, 5 Oct 2012 03:18:47 +0000 (05:18 +0200)
committerJesus Cea <jcea@jcea.es>
Fri, 5 Oct 2012 03:18:47 +0000 (05:18 +0200)
Lib/platform.py

index 10b04bde95ef3646d5fd0785f08de221f3361244..20b91752f311bbd22fd9bb6dd8bcd1b56d9b907b 100755 (executable)
@@ -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