fnp
/
django-cas-provider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
73d0d20
)
Instead of checking for list type, check for collections.Iterable type.
author
deyk
<deyk@crossway.org>
Wed, 18 Apr 2012 17:59:18 +0000
(10:59 -0700)
committer
deyk
<deyk@crossway.org>
Wed, 18 Apr 2012 17:59:18 +0000
(10:59 -0700)
cas_provider/attribute_formatters.py
patch
|
blob
|
history
diff --git
a/cas_provider/attribute_formatters.py
b/cas_provider/attribute_formatters.py
index
a04828d
..
d61af0f
100644
(file)
--- a/
cas_provider/attribute_formatters.py
+++ b/
cas_provider/attribute_formatters.py
@@
-1,4
+1,5
@@
from lxml import etree
+import collections
CAS_URI = 'http://www.yale.edu/tp/cas'
NSMAP = {'cas': CAS_URI}
@@
-10,7
+11,7
@@
def jasig(auth_success, attrs):
style = etree.SubElement(attributes, CAS + 'attraStyle')
style.text = u'Jasig'
for name, value in attrs.items():
- if isinstance(value,
list
):
+ if isinstance(value,
collections.Iterable
):
for e in value:
element = etree.SubElement(attributes, CAS + name)
element.text = e