[Pkg-mozext-commits] [perspectives-extension] 01/09: checkloc - explicitly specify only the namespaces we need

David Prévot taffit at moszumanska.debian.org
Sun Jan 3 02:55:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository perspectives-extension.

commit 031d27659f5896d518eef20ba30e42761b2605eb
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date:   Sun Dec 13 00:01:49 2015 -0700

    checkloc - explicitly specify only the namespaces we need
    
    Fix for GH #166
---
 test/extlib/checkloc.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/extlib/checkloc.py b/test/extlib/checkloc.py
index 024f1ac..9f95ac8 100644
--- a/test/extlib/checkloc.py
+++ b/test/extlib/checkloc.py
@@ -477,7 +477,12 @@ class ManifestSet:
 		try:
 			xml = etree.parse(install_rdf)
 			root = xml.getroot()
-			for locale in root.findall('.//em:locale', root.nsmap):
+			# lxml 3.5.0 raises a ValueError if the namespace map
+			# contains a 'None' entry, even if it also contains
+			# other valid mappings.
+			# Therefore explicitly add only the namespaces we need
+			ns = {'em': 'http://www.mozilla.org/2004/em-rdf#'}
+			for locale in root.findall('.//em:locale', ns):
 				loc = locale.text
 				if loc not in self.rdf_locs:
 					self.rdf_locs[loc] = True

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git



More information about the Pkg-mozext-commits mailing list