Discussion:
[Python-3000-checkins] r66146 - python/branches/py3k/Lib/platform.py
marc-andre.lemburg
2008-09-02 10:33:55 UTC
Permalink
Author: marc-andre.lemburg
Date: Tue Sep 2 12:33:55 2008
New Revision: 66146

Log:
Add quotes around the file name to avoid issues with spaces.

Closes #3719.

Ported to 3.0 from r66145.



Modified:
python/branches/py3k/Lib/platform.py

Modified: python/branches/py3k/Lib/platform.py
==============================================================================
--- python/branches/py3k/Lib/platform.py (original)
+++ python/branches/py3k/Lib/platform.py Tue Sep 2 12:33:55 2008
@@ -945,7 +945,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 = f.read().strip()

Loading...