git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83ce4b4
)
extra whitespace in the 'schemaLocation' field shouldn't prevent us from identifying...
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 6 Jan 2012 21:20:12 +0000
(16:20 -0500)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 6 Jan 2012 21:20:12 +0000
(16:20 -0500)
sfa/util/xml.py
patch
|
blob
|
history
diff --git
a/sfa/util/xml.py
b/sfa/util/xml.py
index
90693f2
..
d438e24
100755
(executable)
--- 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