]> granicus.if.org Git - python/commitdiff
Use defaults if sys.executable isn't set (e.g. on Jython).
authorMarc-André Lemburg <mal@egenix.com>
Sat, 13 Jan 2007 23:13:54 +0000 (23:13 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Sat, 13 Jan 2007 23:13:54 +0000 (23:13 +0000)
This change allows running PyBench under Jython.

Lib/platform.py

index d6c0c17f6bc1279869d39d82b504bbc8f04768f0..86b4b1097ca7b99bfa4533785aaf3e6a61796273 100755 (executable)
@@ -963,7 +963,10 @@ def architecture(executable=sys.executable,bits='',linkage=''):
         bits = str(size*8) + 'bit'
 
     # Get data from the 'file' system command
-    output = _syscmd_file(executable,'')
+    if executable:
+        output = _syscmd_file(executable, '')
+    else:
+        output = ''
 
     if not output and \
        executable == sys.executable: