Skip to contentSkip to conversation

toaster: do not fail on optional 'custom.xml' file

PATCH New David Reyna 1 participant 1 message Feb 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: do not fail on optional 'custom.xml' file

From: David Reyna <[email protected]>

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

[YOCTO #12554]

---
 bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +4 -1
index 582114a..823c6f1 100644
@@ -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, "
Signature · 1 line
2.7.4