From 8849850b612cedbaf52d89e5c27e2a373fe27f68 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Sun, 2 Dec 2018 19:28:16 +0100 Subject: [PATCH] harden the test against existing distributions without an api --- pythonforandroid/distribution.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/distribution.py b/pythonforandroid/distribution.py index cf7f04f5ee..ed31a9b7c6 100644 --- a/pythonforandroid/distribution.py +++ b/pythonforandroid/distribution.py @@ -95,7 +95,9 @@ def get_distribution(cls, ctx, name=None, recipes=[], # 1) Check if any existing dists meet the requirements _possible_dists = [] for dist in possible_dists: - if ndk_api is not None and dist.ndk_api != ndk_api: + if ( + ndk_api is not None and dist.ndk_api != ndk_api + ) or dist.ndk_api is None: continue for recipe in recipes: if recipe not in dist.recipes: