From: Marc-André Lemburg Date: Sat, 13 Jan 2007 23:13:54 +0000 (+0000) Subject: Use defaults if sys.executable isn't set (e.g. on Jython). X-Git-Tag: v2.6a1~2277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b8f60b7003f9a4b364425f1789c9947b998b520;p=thirdparty%2FPython%2Fcpython.git Use defaults if sys.executable isn't set (e.g. on Jython). This change allows running PyBench under Jython. --- diff --git a/Lib/platform.py b/Lib/platform.py index d6c0c17f6bc1..86b4b1097ca7 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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: