diff options
author | Marc-André Lemburg <mal@egenix.com> | 2008-09-02 10:32:34 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2008-09-02 10:32:34 (GMT) |
commit | d15fad7a89d12afb8e0602c975909237865650c8 (patch) | |
tree | db6d4af24fc252cffc19c1a7c3cdd56f94d6c2f5 /Lib/platform.py | |
parent | 91ae3ea2b46a6e61a2112ffc0d53941a39e121ff (diff) | |
download | cpython-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-x | Lib/platform.py | 2 |
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()) |