summaryrefslogtreecommitdiff
path: root/Lib/platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 080b836580..79695ba11d 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -966,7 +966,7 @@ def _syscmd_file(target,default=''):
if sys.platform in ('dos','win32','win16','os2'):
# XXX Others too ?
return default
- target = _follow_symlinks(target)
+ target = _follow_symlinks(target).replace('"', '\\"')
try:
f = os.popen('file "%s" 2> %s' % (target, DEV_NULL))
except (AttributeError,os.error):
@@ -1032,13 +1032,13 @@ def architecture(executable=sys.executable,bits='',linkage=''):
executable == sys.executable:
# "file" command did not return anything; we'll try to provide
# some sensible defaults then...
- if _default_architecture.has_key(sys.platform):
- b,l = _default_architecture[sys.platform]
+ if sys.platform in _default_architecture:
+ b, l = _default_architecture[sys.platform]
if b:
bits = b
if l:
linkage = l
- return bits,linkage
+ return bits, linkage
# Split the output into a list of strings omitting the filename
fileout = _architecture_split(output)[1:]