Fix eSEL indexing from error log "AdditionalData"

Change-Id: I2d83e175f9295a0bddb3c167e5543f9990f4ad52
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index 896ac1d..9a1e4fb 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -277,3 +277,14 @@
         ########################################################################
         """
         return ''.join(e for e in i_str if e.isalnum())
+
+    def get_esel_index(self, esel_list):
+        r"""
+        #######################################################################
+        #   @brief    Returns the eSEL binary index.
+        #   @param    esel_ist: @type list: eSEL list.
+        #   @return   Index of "ESEL=" in the list.
+        #######################################################################
+        """
+        index = [i for i, str in enumerate(esel_list) if 'ESEL=' in str]
+        return index[0]