import codecs
import collections
+import re
from ConfigParser import ConfigParser
from xml.etree.ElementTree import Element, SubElement
encoding = 'utf-8'
+class GPScriptsIniParser(GPIniParser):
+ def build_xml_parameter(self, section_xml, section, key_ini, val_ini):
+ parent_return = super(GPScriptsIniParser,
+ self).build_xml_parameter(section_xml, section,
+ key_ini, val_ini)
+
+ cmdline = re.match('\\d+CmdLine$', key_ini)
+ if cmdline is not None:
+ value = parent_return.find('Value')
+ value.attrib['network_path'] = 'TRUE'
+
+ return parent_return
+
+
class GPFDeploy1IniParser(GPIniParser):
def build_xml_parameter(self, section_xml, section, key_ini, val_ini):
parent_return = super(GPFDeploy1IniParser,
from samba.net import Net
from samba.gp_parse import GPParser, GPNoParserException
from samba.gp_parse.gp_pol import GPPolParser
-from samba.gp_parse.gp_ini import GPIniParser, GPTIniParser, GPFDeploy1IniParser
+from samba.gp_parse.gp_ini import (
+ GPIniParser,
+ GPTIniParser,
+ GPFDeploy1IniParser,
+ GPScriptsIniParser
+)
from samba.gp_parse.gp_csv import GPAuditCsvParser
from samba.gp_parse.gp_inf import GptTmplInfParser
from samba.gp_parse.gp_aas import GPAasParser
return GptTmplInfParser()
if re.match('GPT\.INI$', name, flags=flags):
return GPTIniParser()
+ if re.match('scripts.ini$', name, flags=flags):
+ return GPScriptsIniParser()
+ if re.match('psscripts.ini$', name, flags=flags):
+ return GPScriptsIniParser()
if re.match('.*\.ini$', name, flags=flags):
return GPIniParser()
if re.match('.*\.pol$', name, flags=flags):