|
@@ -37,6 +37,8 @@ def rand_person(nodes):
|
|
|
def create_child(parent_node, child_name, child_attrs=None):
|
|
|
''' creates an xml child element and set its attributes '''
|
|
|
child = etree.SubElement(parent_node, child_name)
|
|
|
+ if child_attrs is None:
|
|
|
+ return child
|
|
|
for attr, value in child_attrs.items():
|
|
|
child.set(attr, value)
|
|
|
return child
|