basestring not supported in python 3.8
This commit is contained in:
parent
d0653d4807
commit
387139f945
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,10 @@ def validate(ticket):
|
|||
attributes = xml_from_dict.get("cas:attributes", {})
|
||||
|
||||
if attributes and "cas:memberOf" in attributes:
|
||||
try:
|
||||
basestring
|
||||
except NameError:
|
||||
basestring = str
|
||||
if isinstance(attributes["cas:memberOf"], basestring):
|
||||
attributes["cas:memberOf"] = attributes["cas:memberOf"].lstrip('[').rstrip(']').split(',')
|
||||
for group_number in range(0, len(attributes['cas:memberOf'])):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue