projects
/
platform
/
upstream
/
gst-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab65e27
)
mangle-tmpl.py: don't fail if there's no description for an element
author
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Sat, 29 Aug 2009 23:15:13 +0000
(
00:15
+0100)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Sat, 29 Aug 2009 23:16:24 +0000
(
00:16
+0100)
mangle-tmpl.py
patch
|
blob
|
history
diff --git
a/mangle-tmpl.py
b/mangle-tmpl.py
index
e4095a2
..
76ca1f5
100644
(file)
--- a/
mangle-tmpl.py
+++ b/
mangle-tmpl.py
@@
-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}