Beispiel #1
0
 def __init__(self, name, children, errors=0):
     attrs = [IDLAttribute('NAME', name), IDLAttribute('ERRORS', errors)]
     if not children:
         children = []
     IDLNode.__init__(self, 'File', name, 1, 0, attrs + children)
     # TODO(teravest): Why do we set release map like this here? This looks
     # suspicious...
     self.release_map = IDLReleaseMap([('M13', 1.0, 'stable')])
Beispiel #2
0
 def Depart(self, node, data, childdata):
     if node.IsA('LabelItem'):
         return (node.GetName(), node.GetProperty('VALUE'))
     if node.IsA('Label') and node.GetName() == GetOption('label'):
         try:
             self.release_map = IDLReleaseMap(childdata)
             node.parent.release_map = self.release_map
         except Exception as err:
             node.Error('Unable to build release map: %s' % str(err))
     return None
Beispiel #3
0
    def Depart(self, node, ignore, childdata):
        # Build list of Release=Version
        if node.IsA('LabelItem'):
            return (node.GetName(), node.GetProperty('VALUE'))

        # On completion of the Label, apply to the parent File if the
        # name of the label matches the generation label.
        if node.IsA('Label') and node.GetName() == GetOption('label'):
            try:
                node.parent.release_map = IDLReleaseMap(childdata)
            except Exception as err:
                node.Error('Unable to build release map: %s' % str(err))

        # For File objects, set the minimum version
        if node.IsA('File'):
            file_min, _ = node.release_map.GetReleaseRange()
            node.SetMin(file_min)

        return None
Beispiel #4
0
 def __init__(self, name, children, errors=0):
   attrs = [IDLAttribute('NAME', name),
            IDLAttribute('ERRORS', errors)]
   if not children: children = []
   IDLNode.__init__(self, 'File', name, 1, 0, attrs + children)
   self.release_map = IDLReleaseMap([('M13', 1.0)])