Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
bookshare
Commits
b9358f3f
Commit
b9358f3f
authored
Apr 27, 2015
by
Daniel W Bond
Browse files
catch exception if student is not in peoplefinder
parent
4847de4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
bookshare/core/cas_callbacks.py
View file @
b9358f3f
...
...
@@ -17,8 +17,12 @@ def pfinfo(u_name):
print
e
else
:
pf_json
=
metadata
.
json
()
name
=
pf_json
[
'results'
][
0
][
'name'
]
return
name
.
split
(
','
)
try
:
name
=
pf_json
[
'results'
][
0
][
'name'
]
return
name
.
split
(
','
)
# if the name is not in peoplefinder, return empty first and last name
except
IndexError
:
return
[
''
,
''
]
def
create_user
(
tree
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment