yaml: add back support for empty LED groups

The old script had support for empty LED groups. I tried removing the
empty "bmc_booted" LED group, but that caused systemd to never "finish"
booting (systemctl is-system-running returned "starting" because it was
blocked waiting for the "bmc_booted" LED service to start).

This adds back support for empty LED groups.

Tested:
Confirmed that with an empty "bmc_booted" LED group, the firmware will
build successfully and systemd doesn't get blocked waiting for the
"bmc_booted" LED service.

Change-Id: I11d7c50696cd50d989a4eaef28f8e5c43473ce6e
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/scripts/parse_led.py b/scripts/parse_led.py
index 5724e6d..ee6bab8 100755
--- a/scripts/parse_led.py
+++ b/scripts/parse_led.py
@@ -90,7 +90,7 @@
     led_dict = ifile[group]
 
     group_priority = 0
-    has_group_priority = "Priority" in led_dict
+    has_group_priority = led_dict and "Priority" in led_dict
 
     if has_group_priority:
         group_priority = led_dict["Priority"]
@@ -108,6 +108,10 @@
         + "{\n"
     )
 
+    # Some LED groups could be empty
+    if not led_dict:
+        led_dict = {}
+
     for led_name, list_dict in list(led_dict.items()):
         generate_file_single_led(
             ifile,