[bitbake-devel,1/2] bitbake: toaster: do not fail on optional 'custom.xml' file

Submitted by Reyna, David on May 29, 2018, 3:26 a.m. | Patch ID: 151146

Details

Message ID edf8c162e67fb734b25b8802d001b604b4188550.1527564213.git.David.Reyna@windriver.com
State New
Headers show

Commit Message

Reyna, David May 29, 2018, 3:26 a.m.
From: David Reyna <David.Reyna@windriver.com>

Explicitly capture and ignore errors when trying to load the optional
'custom.xml' fixture file.

[YOCTO #12554]

(Bitbake rev: 132458939d3987ebc58685397714af3d6d5cd8fd)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/toaster/bldcontrol/management/commands/checksettings.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/toaster/bldcontrol/management/commands/checksettings.py b/lib/toaster/bldcontrol/management/commands/checksettings.py
index 582114a..823c6f1 100644
--- a/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -107,7 +107,10 @@  class Command(BaseCommand):
                                 action="ignore",
                                 message="^.*No fixture named.*$")
                             print("Importing custom settings if present")
-                            call_command("loaddata", "custom")
+                            try:
+                                call_command("loaddata", "custom")
+                            except:
+                                print("NOTE: optional fixture 'custom' not found")
 
                         # we run lsupdates after config update
                         print("\nFetching information from the layer index, "