narrow except for XML Syntax Error on admx file

This commit is contained in:
Ethan Moore 2017-01-10 20:25:48 +00:00
parent bf67fc29a3
commit 7a78c9fe6a

View File

@ -2712,7 +2712,7 @@ def _processPolicyDefinitions(policy_def_path='c:\\Windows\\PolicyDefinitions',
parser = lxml.etree.XMLParser(remove_comments=True)
try:
xmltree = lxml.etree.parse(admfile, parser=parser)
except:
except lxml.etree.XMLSyntaxError:
msg = ('A syntax error was found while processing admx file {0},'
' all policies from this file will be unavailable via this module')
log.error(msg.format(admfile))