summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2008-09-02 10:33:55 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2008-09-02 10:33:55 (GMT)
commit407798595dab4698a86eac4db529cd94b586331e (patch)
treefa88cbf2a2546cf5b16a3ab509ae0d147bae51a2 /Lib/platform.py
parent54bd41d81b23eb5d7f7a5f71fa2ceec28fb60296 (diff)
downloadcpython-407798595dab4698a86eac4db529cd94b586331e.zip
cpython-407798595dab4698a86eac4db529cd94b586331e.tar.gz
cpython-407798595dab4698a86eac4db529cd94b586331e.tar.bz2
Add quotes around the file name to avoid issues with spaces.
Closes #3719. Ported to 3.0 from r66145.
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 27ea1b4..56ab759 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -945,7 +945,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 = f.read().strip()