22import glob
33import json
44
5- from pythonforandroid .logger import (info , info_notify , Err_Style , Err_Fore )
5+ from pythonforandroid .logger import (info , info_notify , warning , Err_Style , Err_Fore )
66from pythonforandroid .util import current_directory , BuildInterruptingException
77from shutil import rmtree
88
@@ -130,21 +130,7 @@ def get_distribution(cls, ctx, name=None, recipes=[],
130130 # If there was a name match but we didn't already choose it,
131131 # then the existing dist is incompatible with the requested
132132 # configuration and the build cannot continue
133- < << << << HEAD
134133 if name_match_dist is not None and not allow_replace_dist :
135- error ('Asked for dist with name {name} with recipes ({req_recipes}) and '
136- 'NDK API {req_ndk_api}, but a dist '
137- 'with this name already exists and has either incompatible recipes '
138- '({dist_recipes}) or NDK API {dist_ndk_api}' .format (
139- name = name ,
140- req_ndk_api = ndk_api ,
141- dist_ndk_api = name_match_dist .ndk_api ,
142- req_recipes = ', ' .join (recipes ),
143- dist_recipes = ', ' .join (name_match_dist .recipes )))
144- error ('No compatible dist found, so exiting.' )
145- exit (1 )
146- == == == =
147- if name_match_dist is not None :
148134 raise BuildInterruptingException (
149135 'Asked for dist with name {name} with recipes ({req_recipes}) and '
150136 'NDK API {req_ndk_api}, but a dist '
@@ -155,7 +141,6 @@ def get_distribution(cls, ctx, name=None, recipes=[],
155141 dist_ndk_api = name_match_dist .ndk_api ,
156142 req_recipes = ', ' .join (recipes ),
157143 dist_recipes = ', ' .join (name_match_dist .recipes )))
158- > >> >> >> Replaced many exit (1 )s with exceptions
159144
160145 # If we got this far, we need to build a new dist
161146 dist = Distribution (ctx )
0 commit comments