if checks if attribute is none
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 27 Oct 2011 00:23:29 +0000 (20:23 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 27 Oct 2011 00:23:29 +0000 (20:23 -0400)
sfa/rspecs/elements/versions/pgv2Link.py

index 727afaf..cbe5861 100644 (file)
@@ -21,7 +21,7 @@ class PGv2Link:
         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'])