Skip to content
Snippets Groups Projects
Commit 739464fb authored by Steven Hammerton's avatar Steven Hammerton
Browse files

Add a comment to clarify why we split on closing curly brace when reading CAS attribute tags

parent 83b464e4
No related branches found
No related tags found
No related merge requests found
......@@ -177,6 +177,11 @@ class LoginRestServlet(ClientV1RestServlet):
if child.tag.endswith("attributes"):
attributes = {}
for attribute in child:
# ElementTree library expands the namespace in attribute tags
# to the full URL of the namespace.
# See (https://docs.python.org/2/library/xml.etree.elementtree.html)
# We don't care about namespace here and it will always be encased in
# curly braces, so we remove them.
if "}" in attribute.tag:
attributes[attribute.tag.split("}")[1]] = attribute.text
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment