Merge remote-tracking branch 'origin/master' into 0.11
[platform/upstream/gst-common.git] / mangle-tmpl.py
index e4095a2..bd4f948 100644 (file)
@@ -8,7 +8,7 @@ insert/overwrite Short Description and Long Description
 
 # FIXME: right now it uses pygst and scans on its own;
 # we really should use inspect/*.xml instead since the result of
-# gst-xmlinspect.py is commited by the docs maintainer, who can be
+# gst-xmlinspect.py is committed by the docs maintainer, who can be
 # expected to have pygst, but this step should be done for every docs build,
 # so no pygst allowed
 
@@ -116,7 +116,10 @@ def get_elements(file):
                 if e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'name':
                     name = e2.childNodes[0].nodeValue.encode("UTF-8")
                 elif e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'description':
-                    description = e2.childNodes[0].nodeValue.encode("UTF-8")
+                    if e2.childNodes:
+                      description = e2.childNodes[0].nodeValue.encode("UTF-8")
+                    else:
+                      description = 'No description'
 
             if name != None and description != None:
                 elements[name] = {'description': description}