[Python-checkins] r66145 - python/trunk/Lib/platform.py
marc-andre.lemburg
python-checkins at python.org
Tue Sep 2 12:32:34 CEST 2008
Author: marc-andre.lemburg
Date: Tue Sep 2 12:32:34 2008
New Revision: 66145
Log:
Add quotes around the file name to avoid issues with spaces.
Closes #3719.
Modified:
python/trunk/Lib/platform.py
Modified: python/trunk/Lib/platform.py
==============================================================================
--- python/trunk/Lib/platform.py (original)
+++ python/trunk/Lib/platform.py Tue Sep 2 12:32:34 2008
@@ -969,7 +969,7 @@
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())
More information about the Python-checkins
mailing list