diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/api.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/api.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/api.py b/bitbake/lib/toaster/toastergui/api.py index 1bec56d468..564d595a1c 100644 --- a/bitbake/lib/toaster/toastergui/api.py +++ b/bitbake/lib/toaster/toastergui/api.py | |||
@@ -677,7 +677,13 @@ class XhrCustomRecipe(View): | |||
677 | recipe_path = os.path.join(layerpath, "recipes", "%s.bb" % | 677 | recipe_path = os.path.join(layerpath, "recipes", "%s.bb" % |
678 | recipe.name) | 678 | recipe.name) |
679 | with open(recipe_path, "w") as recipef: | 679 | with open(recipe_path, "w") as recipef: |
680 | recipef.write(recipe.generate_recipe_file_contents()) | 680 | content = recipe.generate_recipe_file_contents() |
681 | if not content: | ||
682 | # Delete this incomplete image recipe object | ||
683 | recipe.delete() | ||
684 | return error_response("recipe-parent-not-exist") | ||
685 | else: | ||
686 | recipef.write(recipe.generate_recipe_file_contents()) | ||
681 | 687 | ||
682 | return JsonResponse( | 688 | return JsonResponse( |
683 | {"error": "ok", | 689 | {"error": "ok", |