summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2008-09-02 10:32:34 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2008-09-02 10:32:34 (GMT)
commitd15fad7a89d12afb8e0602c975909237865650c8 (patch)
treedb6d4af24fc252cffc19c1a7c3cdd56f94d6c2f5 /Lib/platform.py
parent91ae3ea2b46a6e61a2112ffc0d53941a39e121ff (diff)
downloadcpython-d15fad7a89d12afb8e0602c975909237865650c8.zip
cpython-d15fad7a89d12afb8e0602c975909237865650c8.tar.gz
cpython-d15fad7a89d12afb8e0602c975909237865650c8.tar.bz2
Add quotes around the file name to avoid issues with spaces.
Closes #3719.
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 73b6fdb..cc0431b 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -969,7 +969,7 @@ def _syscmd_file(target,default=''):
return default
target = _follow_symlinks(target)
try:
- f = os.popen('file %s 2> /dev/null' % target)
+ f = os.popen('file "%s" 2> /dev/null' % target)
except (AttributeError,os.error):
return default
output = string.strip(f.read())