X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fxml.py;h=d438e24299f10ce68f5237f980b8f96d820ec245;hb=c46e155d0ae9f37cd94789fcb5f68ea2248ebb72;hp=90693f2e495ee73b3f3073580b1d26f84102f8a7;hpb=83ce4b49e3514055c0b91e9e392fb8d13b39c40e;p=sfa.git diff --git a/sfa/util/xml.py b/sfa/util/xml.py index 90693f2e..d438e242 100755 --- a/sfa/util/xml.py +++ b/sfa/util/xml.py @@ -198,8 +198,9 @@ class XML: # set schema for key in self.root.attrib.keys(): if key.endswith('schemaLocation'): - # schema location should be at the end of the list - schema_parts = self.root.attrib[key].split(' ') + # schemaLocation should be at the end of the list. + # Use list comprehension to filter out empty strings + schema_parts = [x for x in self.root.attrib[key].split(' ') if x] self.schema = schema_parts[1] namespace, schema = schema_parts[0], schema_parts[1] break