complete software group screen

This commit is contained in:
lizhi-rocky
2010-08-02 16:19:59 +08:00
parent 62e5b2b075
commit 5688e9974b
7 changed files with 109 additions and 214 deletions

View File

@@ -6,8 +6,8 @@ from xml.dom import minidom
from xml.dom.ext import PrettyPrint
# xml file names
install_xml = '../../xml/install.xml'
config_xml = './config.xml'
install_xml = '../xml/install.xml'
config_xml = '../xml/config.xml'
def to_xml_attr(doc, node, cls, name):
''' This method is called by to_xml. Its function is to create an attribute, and set its value based on Network data member
@@ -361,6 +361,7 @@ g_node - group node '''
elif grp_chld.nodeName == 'optional':
g.optional.extend([[pkg.attributes['name'].value, pkg.attributes['install'].value] for pkg in grp_chld.childNodes
if pkg.nodeType == pkg.ELEMENT_NODE and pkg.nodeName == 'package'])
g.selection = grp_chld.attributes['selection'].value
init_from_xml = init_from_install_xml
@staticmethod
def to_xml(doc, p_node):
@@ -397,6 +398,9 @@ p_node - xml node (parent node)'''
if g.optional:
optl = doc.createElement('optional')
sel_attr = doc.createAttribute('selection')
sel_attr.value = g.selection
optl.setAttributeNode(sel_attr)
for o in g.optional:
pkg = doc.createElement('package')
pname_attr = doc.createAttribute('name')