Address new yaml format changes introduced by sdbusplus commit 7d7fda5

Patrick's commit for exceptions had a few tweaks to the yaml
file format.  This commit updates elog_gen.py to support them.

Change-Id: I59261ab0fddefde67304cbb394c74b9c9c5e496f
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/elog.yaml b/elog.yaml
index 17cf1e0..6d7cf0b 100644
--- a/elog.yaml
+++ b/elog.yaml
@@ -1,22 +1,21 @@
-error-codes:
-    - name: org.freedesktop.DBus.Error.FileNotFound
-      msg: "A required file was not found"
-      level: INFO
-      meta:
-        - str: "ERRNUM=0x%.4X"
-          type: int
-        - str: FILE_PATH=%s
-          type: const char *
-        - str: FILE_NAME=%s
-          type: const char *
+- name: org.freedesktop.DBus.Error.FileNotFound
+  description: A required file was not found
+  level: INFO
+  meta:
+    - str: "ERRNUM=0x%.4X"
+      type: int
+    - str: FILE_PATH=%s
+      type: const char *
+    - str: FILE_NAME=%s
+      type: const char *
 
-    - name: xyz.openbmc_project.Hwsv.Error.Scom
-      msg: "Getscom call failed"
-      level: ERR
-      meta:
-            - str: DEV_ADDR=0x%.8X
-              type: int
-            - str: DEV_ID=%u
-              type: int
-            - str: DEV_NAME=%s
-              type: const char*
+- name: xyz.openbmc_project.Hwsv.Error.Scom
+  description: Getscom call failed
+  level: ERR
+  meta:
+        - str: DEV_ADDR=0x%.8X
+          type: int
+        - str: DEV_ID=%u
+          type: int
+        - str: DEV_NAME=%s
+          type: const char*
diff --git a/tools/elog-gen.py b/tools/elog-gen.py
index c94e1b4..7f2448d 100755
--- a/tools/elog-gen.py
+++ b/tools/elog-gen.py
@@ -39,10 +39,10 @@
     # see elog.yaml for reference
     ifile = yaml.safe_load(open(i_elog_yaml))
     err_count = 0
-    for i in ifile['error-codes']:
+    for i in ifile:
         # Grab the main error and it's info
         errors[err_count] = i['name']
-        error_msg[i['name']] = i['msg']
+        error_msg[i['name']] = i['description']
         error_lvl[i['name']] = i['level']
         tmp_meta = []
         # grab all the meta data fields and info