Skip to content

Commit 25e9ad6

Browse files
committed
skip empty descriptions
1 parent 2d5e22e commit 25e9ad6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

nipype/interfaces/slicer/generate_classes.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@ def generate_class(module, launcher, strip_module_name_prefix=True):
144144
'documentation-url', 'license', 'contributor',
145145
'acknowledgements']:
146146
el = dom.getElementsByTagName(desc_str)
147-
if el and el[0].firstChild:
148-
class_string += desc_str + ": " + el[
149-
0].firstChild.nodeValue + "\n\n"
147+
if el and el[0].firstChild and el[0].firstChild.nodeValue.strip():
148+
class_string += desc_str + ": " + el[0].firstChild.nodeValue.strip() + "\n\n"
150149
if desc_str == 'category':
151-
category = el[0].firstChild.nodeValue
150+
category = el[0].firstChild.nodeValue.strip()
152151
class_string += "\"\"\""
153152

154153
for paramGroup in dom.getElementsByTagName("parameters"):

0 commit comments

Comments
 (0)