aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2007-10-04 14:13:04 +0000
committerRobert Buchholz <rbu@gentoo.org>2007-10-04 14:13:04 +0000
commita982c7d79a54af5b374491ab94a3e546718d9b8c (patch)
tree9f9dce8d669337cf30c34589ae70a82f38209500 /lib
parentAuto-Update (diff)
downloadsecurity-a982c7d79a54af5b374491ab94a3e546718d9b8c.tar.gz
security-a982c7d79a54af5b374491ab94a3e546718d9b8c.tar.bz2
security-a982c7d79a54af5b374491ab94a3e546718d9b8c.zip
Survive illegal XML
svn path=/; revision=12
Diffstat (limited to 'lib')
-rw-r--r--lib/python/nvd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/python/nvd.py b/lib/python/nvd.py
index 2e375f3..5418e2f 100644
--- a/lib/python/nvd.py
+++ b/lib/python/nvd.py
@@ -145,7 +145,10 @@ def parseAll(files):
parser.setContentHandler(p)
for name in files:
file = open(name)
- parser.parse(file)
+ try:
+ parser.parse(file)
+ except xml.sax._exceptions.SAXParseException, e:
+ print "XML Parsing error at %s: %s" % (name, e)
file.close()
return p.result