summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-13 20:55:52 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-13 20:55:52 (GMT)
commit95aa56a6fb870397e2fc31b40154f32688ab33e4 (patch)
tree8f4ec3e12eb2f2942c45aa93a2e8de77c2106a64 /Lib/test/support
parent6c5f21945ad03e1e66328286965219b890eca848 (diff)
downloadcpython-95aa56a6fb870397e2fc31b40154f32688ab33e4.zip
cpython-95aa56a6fb870397e2fc31b40154f32688ab33e4.tar.gz
cpython-95aa56a6fb870397e2fc31b40154f32688ab33e4.tar.bz2
Issue #26934: Handle _ANDROID_API_LEVEL is None on Windows
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 961b735..d862d8b 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -736,7 +736,7 @@ requires_lzma = unittest.skipUnless(lzma, 'requires lzma')
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'