[Python-checkins] cpython (3.6): Issue #26934: Handle _ANDROID_API_LEVEL is None on Windows

xavier.degaye python-checkins at python.org
Sun Nov 13 15:57:29 EST 2016


https://hg.python.org/cpython/rev/2639afcedaad
changeset:   105089:2639afcedaad
branch:      3.6
parent:      105086:f37ac1a003f3
user:        Xavier de Gaye <xdegaye at users.sourceforge.net>
date:        Sun Nov 13 21:55:52 2016 +0100
summary:
  Issue #26934: Handle _ANDROID_API_LEVEL is None on Windows

files:
  Lib/test/support/__init__.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -736,7 +736,7 @@
 is_jython = sys.platform.startswith('java')
 
 _ANDROID_API_LEVEL = sysconfig.get_config_var('ANDROID_API_LEVEL')
-is_android = (_ANDROID_API_LEVEL > 0)
+is_android = (_ANDROID_API_LEVEL is not None and _ANDROID_API_LEVEL > 0)
 
 if sys.platform != 'win32':
     unix_shell = '/system/bin/sh' if is_android else '/bin/sh'

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list