Show
Ignore:
Timestamp:
06/20/11 11:55:52 (2 years ago)
Author:
Snyder.Jason
Message:

modified importNode to assign the correct component type to each component in a node. previously, all were executabledevices by default

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/trunk/tools/WaveDev/wavedev/importNode.py

    r9580 r10753  
    9494                break 
    9595        pathSPD = parent.installPath + "dev/" + local_SPD 
    96  
    9796        if not os.path.exists(pathSPD): 
    9897            errorMsg(parent, "Warning! Could not find " + pathSPD + ".\nCannot import node " + Nname) 
     
    107106 
    108107        doc_scd = xml.dom.minidom.parse(pathSCD) 
    109  
     108         
     109        #The new component is first created as an executable 
     110        #device but that may not be true 
     111        #grab the componenttype node from the scd file... 
     112        typeNode = doc_scd.getElementsByTagName("componenttype") 
     113        #... the pull out the actual value... 
     114        compType = typeNode[0].firstChild.toxml() 
     115        #... and assign it to the component 
     116        newComp.type = compType 
     117         
    110118        # Get the Ports 
    111119        portsNodes = doc_scd.getElementsByTagName("ports")