diff options
authorVishwanatha Subbanna <>2017-03-30 11:21:37 +0530
committerVishwanatha Subbanna <>2017-03-30 11:21:37 +0530
commitd53de6fc3b9a6542f67c572cca5326a0e23f99c6 (patch)
parent169ff8aa8801b2cc4b1582505c6f14bc268c0a11 (diff)
LEDS: Handle empty group
LED group consists of name and the associated LEDs that need to be actioned on when the group is asserted or de-asserted. However, its not a hard requirement that all the groups must have the associated LEDs if the system does not have the usecase. For example, it is required from the firmware standpoint that the groups "bmc_booted" and "power_on" be present but not all systems may have a mapping LED. So in those cases, the group itself can be in asserted state but without doing anything underneath. Providing this support will make sure that addition of LEDs into those groups if needed in the future are handled seamlessly. Change-Id: I345886a3edbabf11f1e9f5c9de4b9cf28a7c33f6 Signed-off-by: Vishwanatha Subbanna <>
1 files changed, 5 insertions, 0 deletions
diff --git a/ b/
index 766a6aa..da23328 100755
--- a/
+++ b/
@@ -54,6 +54,11 @@ if __name__ == '__main__':
underscore(group) +
+ # Some LED groups could be empty
+ if not ledset:
+ ofile.write(' }},\n')
+ continue
for led_dict, list_dict in ledset.iteritems():
# Need this to make sure the LED name is printed once
name_printed = False
OpenPOWER on IntegriCloud