def fromXML(self, node):
        if node.nodeName != 'module':
            return None
        
        functions = []
        
        annotations = {}
        portSpecs = {}
        
        # read attributes
        id = self.convertFromStr(self.getAttribute(node, 'id'), 'long')
        cache = self.convertFromStr(self.getAttribute(node, 'cache'), 'int')
        name = self.convertFromStr(self.getAttribute(node, 'name'), 'str')
        package = self.convertFromStr(self.getAttribute(node, 'package'), 'str')
        version = self.convertFromStr(self.getAttribute(node, 'version'), 'str')
        
        location = None
        
        # read children
        for child in list(node.childNodes):
            if child.nodeName == 'location':
                location = self.getDao('location').fromXML(child)
            elif child.nodeName == 'function':
                function = self.getDao('function').fromXML(child)
                functions.append(function)
            elif child.nodeName == 'annotation':
                annotation = self.getDao('annotation').fromXML(child)
                annotations[annotation.db_id] = annotation
            elif child.nodeName == 'portSpec':
                portSpec = self.getDao('portSpec').fromXML(child)
                portSpecs[portSpec.db_id] = portSpec
            elif child.nodeType == child.TEXT_NODE and child.nodeValue.strip() == '':
                # node.removeChild(child)
                pass
            elif child.nodeType != child.TEXT_NODE:
                print child.nodeName % '*** ERROR *** nodeName = %s'
        
        obj = DBModule(id=id,
                       cache=cache,
                       name=name,
                       package=package,
                       version=version,
                       location=location,
                       functions=functions,
                       annotations=annotations,
                       portSpecs=portSpecs)
        obj.is_dirty = False
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_6_0/persistence/xml/auto_gen.py/DBModuleXMLDAOBase.fromXML/swapped operands of `%`