Subversion Repositories se3

Rev

Blame | Last modification | View Log | RSS feed

import sys
from xml.dom import minidom
import ConfigParser

config = ConfigParser.RawConfigParser()
seven_path='/var/se3/unattended/install/os/seven'
try:
        lang=config.read(seven_path + '/sources/lang.ini')
        locale=lang.options('Available UI Languages')[0]
except OSError:
        print "impossible d'ouvrir lang.ini"

try:
        ei=config.read(seven_path + '/sources/ei.cfg')
        EditionID=ei.options('EditionID')[0]
except OSError:
        print "impossible d'ouvrir ei.cfg"

try:
    installxml = system('/usr/bin/wimextractxml ' + seven_path + '/sources/install.xml | iconv -c')
except OSError:
        print "impossible d'ouvrir install.xml"
   
install = minidom.parseString(installxml)
for flag in install.getElementsByTagName("FLAGS"):
        if flag.firstChild.data == EditionID :
                index=flag.parentNode.attributes["INDEX"].value
                break
try:
        unattend = minidom.parseFile(seven_path + '/unattend.xml')
except OSError:
        print "impossible d'ouvrir unattend.xml"