diff Lib/platform.py @ 48958:3779fc9dfe5f legacy-trunk

Add quotes around the file name to avoid issues with spaces. Closes #3719.
author Marc-André Lemburg <mal@egenix.com>
date Tue, 02 Sep 2008 10:32:34 +0000
parents ed59f3b67b3a
children 3169236773f1
line wrap: on
line diff
--- a/Lib/platform.py	Tue Sep 02 10:14:47 2008 +0000
+++ b/Lib/platform.py	Tue Sep 02 10:32:34 2008 +0000
@@ -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())