Skip to content

Commit aacc461

Browse files
committed
Made recipes command fail nicely on bad recipes
1 parent 6f94498 commit aacc461

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pythonforandroid/toolchain.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,10 @@ def recipes(self, args):
508508
print(" ".join(set(Recipe.list_recipes(ctx))))
509509
else:
510510
for name in sorted(Recipe.list_recipes(ctx)):
511-
recipe = Recipe.get_recipe(name, ctx)
511+
try:
512+
recipe = Recipe.get_recipe(name, ctx)
513+
except IOError:
514+
warning('Recipe "{}" could not be loaded'.format(name))
512515
version = str(recipe.version)
513516
print('{Fore.BLUE}{Style.BRIGHT}{recipe.name:<12} '
514517
'{Style.RESET_ALL}{Fore.LIGHTBLUE_EX}'

0 commit comments

Comments
 (0)