for link in links:
link_elem = etree.SubElement(root, 'link')
for attrib in ['component_name', 'component_id', 'client_id']:
- if attrib in link and link[attrib]:
+ if attrib in link and link[attrib] is not None:
link_elem.set(attrib, link[attrib])
if 'component_manager' in link and link['component_manager']:
cm_element = etree.SubElement(link_elem, 'component_manager', name=link['component_manager'])
latency=link['latency'], packet_loss=link['packet_loss'])
if 'type' in link and link['type']:
type_elem = etree.SubElement(link_elem, 'link_type', name=link['type'])
-
@staticmethod
def get_links(xml):
links = []
def get_link_requests(xml):
link_requests = []
for link in PGv2Link.get_links(xml):
- if link['client_id']:
+ if link['client_id'] != None:
link_requests.append(link)
return link_requests