From 294920f6b932992e9da8864ca96ae35fe2402406 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 30 Jun 2017 21:19:41 -0700 Subject: [PATCH] jedi: silence xml parser warning https://bugzilla.gnome.org/show_bug.cgi?id=784327 --- diff --git a/plugins/jedi/jedi_plugin.py b/plugins/jedi/jedi_plugin.py index 7be46f2..d257680 100644 --- a/plugins/jedi/jedi_plugin.py +++ b/plugins/jedi/jedi_plugin.py @@ -298,7 +298,11 @@ class DocumentationDB(object): cursor.execute('UPDATE girfiles SET last_modified=? WHERE file=?', (mtime, filename)) parser = lxml.etree.XMLParser(recover=True) tree = lxml.etree.parse(filename, parser=parser) - namespace = tree.find('core:namespace', namespaces=ns) + try: + namespace = tree.find('core:namespace', namespaces=ns) + except: + print("Failed to parse", filename) + continue library_version = namespace.attrib['version'] for node in namespace.findall('core:class', namespaces=ns): doc = node.find('core:doc', namespaces=ns) -- libgit2 0.26.0